2024-11-30 00:36:33 +01:00
|
|
|
cmake_minimum_required(VERSION 3.12)
|
2023-08-15 12:57:36 +02:00
|
|
|
project(cgame)
|
2023-06-17 01:44:38 +02:00
|
|
|
|
|
|
|
# Shared source files for modules
|
|
|
|
set(SOURCES_SHARED
|
|
|
|
"../qcommon/class.cpp"
|
|
|
|
"../qcommon/con_set.cpp"
|
|
|
|
"../qcommon/con_timer.cpp"
|
|
|
|
"../qcommon/listener.cpp"
|
|
|
|
"../qcommon/lz77.cpp"
|
|
|
|
"../qcommon/mem_blockalloc.cpp"
|
|
|
|
"../qcommon/mem_tempalloc.cpp"
|
|
|
|
"../qcommon/q_math.c"
|
|
|
|
"../qcommon/q_shared.c"
|
|
|
|
"../qcommon/script.cpp"
|
|
|
|
"../qcommon/str.cpp"
|
|
|
|
"../script/scriptexception.cpp"
|
|
|
|
"../script/scriptvariable.cpp"
|
|
|
|
)
|
|
|
|
|
2023-11-03 21:09:18 +01:00
|
|
|
file(GLOB_RECURSE SOURCES_BG "../fgame/bg_misc.cpp" "../fgame/bg_pmove.cpp" "../fgame/bg_slidemove.cpp" "../fgame/bg_voteoptions.cpp")
|
2023-06-17 01:44:38 +02:00
|
|
|
file(GLOB_RECURSE SOURCES_CGAME "./*.c" "./*.cpp")
|
|
|
|
|
|
|
|
add_library(cgame SHARED ${SOURCES_CGAME} ${SOURCES_BG})
|
2023-07-02 20:06:15 +02:00
|
|
|
target_compile_definitions(cgame PRIVATE CGAME_DLL)
|
2023-06-17 01:44:38 +02:00
|
|
|
target_compile_features(cgame PUBLIC cxx_nullptr)
|
|
|
|
target_compile_features(cgame PUBLIC c_variadic_macros)
|
|
|
|
target_link_libraries(cgame PUBLIC qcommon)
|
|
|
|
|
2024-11-20 22:06:14 +01:00
|
|
|
set_target_properties(cgame PROPERTIES PREFIX "")
|
2024-09-22 14:56:02 +02:00
|
|
|
set_target_properties(cgame PROPERTIES OUTPUT_NAME "cgame${TARGET_BIN_SUFFIX}")
|
2023-06-17 01:44:38 +02:00
|
|
|
|
2024-11-21 19:23:38 +01:00
|
|
|
INSTALL(TARGETS cgame DESTINATION ${CMAKE_INSTALL_LIBDIR}/${LIB_INSTALL_SUBDIR})
|
2023-06-17 01:44:38 +02:00
|
|
|
|
|
|
|
if(MSVC)
|
2024-11-21 19:23:38 +01:00
|
|
|
INSTALL(FILES $<TARGET_PDB_FILE:cgame> DESTINATION ${CMAKE_INSTALL_LIBDIR}/${LIB_INSTALL_SUBDIR} OPTIONAL)
|
2023-06-17 01:44:38 +02:00
|
|
|
endif()
|