mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-23 12:08:56 +00:00
73373205e5
CMake: add all headers to target sources
32 lines
1016 B
CMake
32 lines
1016 B
CMake
set(HEADERS
|
|
lanclient.h
|
|
lanstrings.h)
|
|
set(CPPS lanclient.cpp)
|
|
|
|
add_library(Direct_TCP_IP MODULE ${HEADERS} ${CPPS})
|
|
set_target_properties(Direct_TCP_IP PROPERTIES PREFIX "")
|
|
set_target_properties(Direct_TCP_IP PROPERTIES CXX_VISIBILITY_PRESET "hidden")
|
|
set_target_properties(Direct_TCP_IP PROPERTIES OUTPUT_NAME "Direct TCP~IP")
|
|
target_link_libraries(Direct_TCP_IP PRIVATE
|
|
ddio
|
|
inetfile
|
|
misc
|
|
ui
|
|
$<$<PLATFORM_ID:Windows>:ws2_32>
|
|
)
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
set_target_properties(Direct_TCP_IP PROPERTIES SUFFIX ".dylib")
|
|
endif()
|
|
|
|
add_custom_target(Direct_TCP_IP_Hog
|
|
COMMAND $<TARGET_FILE:HogMaker>
|
|
"$<TARGET_FILE_DIR:Descent3>/online/Direct TCP~IP.d3c"
|
|
"${CMAKE_SOURCE_DIR}/netcon/lanclient/TCP_IP.d3c.txt"
|
|
"${CMAKE_SOURCE_DIR}/scripts/data/fullhog/"
|
|
"$<TARGET_FILE_DIR:Direct_TCP_IP>"
|
|
|
|
DEPENDS Direct_TCP_IP HogMaker
|
|
COMMENT "Generate 'Direct TCP~IP.d3c'"
|
|
)
|
|
install(FILES "$<TARGET_FILE_DIR:Descent3>/online/Direct TCP~IP.d3c" DESTINATION ${CMAKE_INSTALL_DATADIR}/online)
|