@ -123,21 +123,12 @@ install(FILES etc/laminarc-completion.zsh DESTINATION ${ZSH_COMPLETIONS_DIR} REN
install ( TARGETS laminard laminarc RUNTIME DESTINATION usr/bin )
install ( FILES etc/laminar.service DESTINATION ${ SYSTEMD_UNITDIR } )
# A n i n i t i a l a t t e m p t a t s o l v i n g h t t p s : / / g i t h u b . c o m / o h w g i l e s / l a m i n a r / i s s u e s / 9 2
# D o n ' t o v e r w r i t e t h e c o n f i g f i l e i f i t a l r e a d y e x i s t s a t t h e t a r g e t l o c a t i o n
# @ t o d o - m i g r a t i o n / o v e r r i d e s c r i p t i f t h e d e f a u l t s c h a n g e o r t h e o p t i o n s g e t p r u n e d ?
if ( NOT EXISTS "${CMAKE_INSTALL_PREFIX}etc/laminar.conf" )
install (
F I L E S $ { C M A K E _ I N S T A L L _ P R E F I X } e t c / l a m i n a r . c o n f
D E S T I N A T I O N e t c
)
else ( NOT EXISTS "${CMAKE_INSTALL_PREFIX}etc/laminar.conf" )
# h a r d c o d e d v a l u e s a r e e x a m p l e s o f t e c h n i c a l d e b t , a n d i n a n i d e a l w o r l d , a r e e l i m i n a t e d .
MESSAGE ( "-- A ${CMAKE_INSTALL_PREFIX}etc/laminar.conf file exists, will create ${CMAKE_INSTALL_PREFIX}etc/laminar.conf.example instead of overwriting." )
# T h i s a l s o d i s p l a y s a t c o n f i g t i m e , r a t h e r t h a n i n s t a l l t i m e .
# I n a n i d e a l w o r l d , t h e u s e r g e t s o f f e r e d t h e o p t i o n t o o v e r w r i t e , c o m p a r e , o r k e e p / c o p y t h e f i l e
install (
F I L E S $ { C M A K E _ I N S T A L L _ P R E F I X } e t c / l a m i n a r . c o n f
D E S T I N A T I O N e t c
R E N A M E " l a m i n a r . c o n f . e x a m p l e "
F I L E S e t c / l a m i n a r . c o n f
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } e t c
)
endif ( NOT EXISTS "${CMAKE_INSTALL_PREFIX}etc/laminar.conf" )