@ -77,6 +77,9 @@ set_source_files_properties( Brushes.h PROPERTIES HEADER_FILE_ONLY TRUE )
# P l u g i n s
# P l u g i n s
option ( BUILD_SUPPORTED "Build the supported plugins (reveal, probe, etc.)." ON )
option ( BUILD_SUPPORTED "Build the supported plugins (reveal, probe, etc.)." ON )
if ( BUILD_SUPPORTED )
if ( BUILD_SUPPORTED )
# I f y o u a r e a d d i n g a p l u g i n t h a t y o u d o n o t i n t e n d t o c o m m i t t o t h e D F H a c k r e p o ,
# s e e i n s t r u c t i o n s f o r a d d i n g " e x t e r n a l " p l u g i n s a t t h e e n d o f t h i s f i l e .
dfhack_plugin ( 3dveins 3dveins.cpp )
dfhack_plugin ( 3dveins 3dveins.cpp )
dfhack_plugin ( add-spatter add-spatter.cpp )
dfhack_plugin ( add-spatter add-spatter.cpp )
# dfhack_plugin ( advtools advtools.cpp )
# dfhack_plugin ( advtools advtools.cpp )
@ -175,6 +178,9 @@ if(BUILD_SUPPORTED)
dfhack_plugin ( workNow workNow.cpp )
dfhack_plugin ( workNow workNow.cpp )
dfhack_plugin ( xlsxreader xlsxreader.cpp LINK_LIBRARIES lua xlsxio_read_STATIC zip expat )
dfhack_plugin ( xlsxreader xlsxreader.cpp LINK_LIBRARIES lua xlsxio_read_STATIC zip expat )
dfhack_plugin ( zone zone.cpp LINK_LIBRARIES lua )
dfhack_plugin ( zone zone.cpp LINK_LIBRARIES lua )
# I f y o u a r e a d d i n g a p l u g i n t h a t y o u d o n o t i n t e n d t o c o m m i t t o t h e D F H a c k r e p o ,
# s e e i n s t r u c t i o n s f o r a d d i n g " e x t e r n a l " p l u g i n s a t t h e e n d o f t h i s f i l e .
endif ( )
endif ( )
# t h i s i s t h e s k e l e t o n p l u g i n . I f y o u w a n t t o m a k e y o u r o w n , m a k e a c o p y a n d t h e n c h a n g e i t
# t h i s i s t h e s k e l e t o n p l u g i n . I f y o u w a n t t o m a k e y o u r o w n , m a k e a c o p y a n d t h e n c h a n g e i t
@ -183,12 +189,34 @@ if(BUILD_SKELETON)
add_subdirectory ( skeleton )
add_subdirectory ( skeleton )
endif ( )
endif ( )
if ( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.custom.txt" )
file ( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.custom.txt" " # You can add custom plugins here to avoid touching plugins/CMakeLists.txt,
# T h i s c a n b e u s e f u l i f y o u ' v e m a d e m o d i f i c a t i o n s t o t h a t f i l e a n d t r y t o
# s w i t c h b e t w e e n b r a n c h e s t h a t h a v e a l s o m a d e m o d i f i c a t i o n s t o i t .
# T o a d d " e x t e r n a l " p l u g i n s w i t h o u t c o m m i t t i n g t h e m t o t h e D F H a c k r e p o :
#
# 1 . r u n C M a k e a s y o u n o r m a l l y do ( this is only necessary once if
# ` e x t e r n a l / C M a k e L i s t s . t x t ` d o e s n o t e x i s t y e t )
# 2 . a d d t h e p l u g i n t o t h e ` e x t e r n a l ` folder ( relative to this file ) .
# - f o r a m u l t i - f i l e p l u g i n , e i t h e r c l o n e t h e r e p o s i t o r y i n s i d e o f t h e
# ` e x t e r n a l ` f o l d e r , o r a d d t h e f o l d e r t h e r e m a n u a l l y .
# - f o r a s i n g l e - f i l e p l u g i n , s i m p l y a d d t h e f i l e t h e r e .
# 3 . a d d a n e n t r y t o ` e x t e r n a l / C M a k e L i s t s . t x t ` :
# - add_subdirectory ( ) f o r m u l t i - f i l e p l u g i n s i n a s u b d i r e c t o r y
# - dfhack_plugin ( ) f o r s i n g l e - f i l e p l u g i n s
# 4 . b u i l d D F H a c k a s n o r m a l . T h e p l u g i n s y o u a d d e d w i l l b e b u i l t a s w e l l .
if ( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/external/CMakeLists.txt" )
file ( WRITE "${CMAKE_CURRENT_SOURCE_DIR}/external/CMakeLists.txt"
" # A d d e x t e r n a l p l u g i n s h e r e - t h i s f i l e i s i g n o r e d b y g i t
# R e c o m m e n d e d : u s e add_subdirectory ( ) f o r f o l d e r s t h a t y o u h a v e c r e a t e d w i t h i n
# t h i s f o l d e r , o r dfhack_plugin ( ) f o r s i n g l e f i l e s t h a t y o u h a v e a d d e d h e r e .
# S e e t h e e n d o f / p l u g i n s / C M a k e L i s t s . t x t f o r m o r e d e t a i l s .
" )
" )
endif ( )
endif ( )
include ( CMakeLists.custom.txt )
include ( "${CMAKE_CURRENT_SOURCE_DIR}/external/CMakeLists.txt" )
# f o r b a c k w a r d s c o m p a t i b i l i t y
if ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.custom.txt" )
include ( "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.custom.txt" )
endif ( )