mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
72e8347fe1
This solves problem of inability determine generated output directory of libraries targets. Now `add_custom_command()`, used on HOG generation, correctly locates all needed paths and not depends on generated variables.
45 lines
1.1 KiB
CMake
45 lines
1.1 KiB
CMake
set(HEADERS
|
|
chat_api.h
|
|
mt_net.h
|
|
mtclient.h
|
|
mtgametrack.h
|
|
mtpilottrack.h
|
|
mtstrings.h)
|
|
set(CPPS
|
|
chat_api.cpp
|
|
mt_net.cpp
|
|
mtclient.cpp
|
|
mtgametrack.cpp
|
|
mtpilottracker.cpp
|
|
)
|
|
|
|
add_library(Parallax_Online MODULE ${HEADERS} ${CPPS})
|
|
set_target_properties(Parallax_Online PROPERTIES PREFIX "")
|
|
set_target_properties(Parallax_Online PROPERTIES CXX_VISIBILITY_PRESET "hidden")
|
|
set_target_properties(Parallax_Online PROPERTIES OUTPUT_NAME "Parallax Online")
|
|
target_link_libraries(Parallax_Online PRIVATE
|
|
ddio
|
|
inetfile
|
|
misc
|
|
module
|
|
ui
|
|
$<$<PLATFORM_ID:Windows>:ws2_32>
|
|
)
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
set_target_properties(Parallax_Online PROPERTIES SUFFIX ".dylib")
|
|
endif()
|
|
|
|
include(HogMaker)
|
|
MakeHog(
|
|
TARGET Parallax_Online_Hog
|
|
OUTPUT "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/online/Parallax Online.d3c"
|
|
INPUT_FILE "${CMAKE_SOURCE_DIR}/netcon/mtclient/Parallax_Online.d3c.txt"
|
|
SEARCH_PATH "$<TARGET_FILE_DIR:Parallax_Online>" "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/"
|
|
DEPENDS Parallax_Online
|
|
)
|
|
|
|
install(
|
|
FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/online/Parallax Online.d3c"
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/online
|
|
)
|