2016-11-08 02:41:27 -07:00
|
|
|
PROJECT (remotefortressreader)
|
|
|
|
# A list of source files
|
|
|
|
SET(PROJECT_SRCS
|
|
|
|
remotefortressreader.cpp
|
2017-12-24 06:03:25 -07:00
|
|
|
adventure_control.cpp
|
2017-03-25 10:53:40 -06:00
|
|
|
building_reader.cpp
|
2018-01-17 06:40:19 -07:00
|
|
|
item_reader.cpp
|
2016-11-08 02:41:27 -07:00
|
|
|
)
|
|
|
|
# A list of headers
|
|
|
|
SET(PROJECT_HDRS
|
2017-12-24 06:03:25 -07:00
|
|
|
adventure_control.h
|
2017-03-25 10:53:40 -06:00
|
|
|
building_reader.h
|
2018-01-17 06:40:19 -07:00
|
|
|
item_reader.h
|
2017-06-20 04:16:03 -06:00
|
|
|
df_version_int.h
|
2016-11-08 02:41:27 -07:00
|
|
|
)
|
|
|
|
#proto files to include.
|
|
|
|
SET(PROJECT_PROTO
|
2018-04-06 13:17:34 -06:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../proto/RemoteFortressReader.pb.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../proto/AdventureControl.pb.cc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../proto/ItemdefInstrument.pb.cc
|
2016-11-08 02:41:27 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
SET_SOURCE_FILES_PROPERTIES( ${PROJECT_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE)
|
2018-04-06 13:17:34 -06:00
|
|
|
SET_SOURCE_FILES_PROPERTIES( ${PROJECT_PROTO} PROPERTIES GENERATED TRUE)
|
2016-11-08 02:41:27 -07:00
|
|
|
|
|
|
|
# mash them together (headers are marked as headers and nothing will try to compile them)
|
2018-04-06 13:17:34 -06:00
|
|
|
LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS};${PROJECT_PROTO})
|
2016-11-08 02:41:27 -07:00
|
|
|
|
|
|
|
#linux
|
|
|
|
IF(UNIX)
|
|
|
|
add_definitions(-DLINUX_BUILD)
|
|
|
|
SET(PROJECT_LIBS
|
|
|
|
# add any extra linux libs here
|
|
|
|
${PROJECT_LIBS}
|
|
|
|
)
|
|
|
|
# windows
|
|
|
|
ELSE(UNIX)
|
|
|
|
SET(PROJECT_LIBS
|
|
|
|
# add any extra windows libs here
|
|
|
|
${PROJECT_LIBS}
|
|
|
|
$(NOINHERIT)
|
|
|
|
)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
# this makes sure all the stuff is put in proper places and linked to dfhack
|
2018-04-06 20:22:48 -06:00
|
|
|
DFHACK_PLUGIN(RemoteFortressReader ${PROJECT_SRCS} LINK_LIBRARIES protobuf-lite ${PROJECT_LIBS} COMPILE_FLAGS_MSVC "/FI\"Export.h\"" COMPILE_FLAGS_GCC "-include Export.h -Wno-misleading-indentation" )
|