Descent3/netcon/mtclient/CMakeLists.txt
Azamat H. Hackimov 72e8347fe1 Move Descent3 built targets into "${CMAKE_BINARY_DIR}/build" directory
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.
2024-10-27 22:04:00 +03:00

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
)