mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
35 lines
1.5 KiB
Text
35 lines
1.5 KiB
Text
![]() |
project(Launcher)
|
||
|
|
||
|
set(LAUNCHER_SOURCES "${CMAKE_SOURCE_DIR}/code/Launcher/launch_main.cpp")
|
||
|
|
||
|
if (WIN32)
|
||
|
set(LAUNCHER_SOURCES ${LAUNCHER_SOURCES}
|
||
|
"${CMAKE_SOURCE_DIR}/code/Launcher/launch_win32.cpp"
|
||
|
"${CMAKE_SOURCE_DIR}/code/sys/win_resource.rc")
|
||
|
else()
|
||
|
set(LAUNCHER_SOURCES ${LAUNCHER_SOURCES}
|
||
|
"${CMAKE_SOURCE_DIR}/code/Launcher/launch_linux.cpp")
|
||
|
endif()
|
||
|
|
||
|
function (create_launcher name type)
|
||
|
add_executable(openmohaa_launcher_${name} ${LAUNCHER_SOURCES})
|
||
|
target_include_directories(openmohaa_launcher_${name} PUBLIC "../qcommon")
|
||
|
target_compile_definitions(openmohaa_launcher_${name} PRIVATE NO_RC_MANIFEST=1 TARGET_GAME=${type})
|
||
|
target_compile_features(openmohaa_launcher_${name} PRIVATE cxx_std_17)
|
||
|
set_target_properties(openmohaa_launcher_${name} PROPERTIES OUTPUT_NAME "launch_openmohaa_${name}${TARGET_BIN_SUFFIX}")
|
||
|
|
||
|
INSTALL(TARGETS openmohaa_launcher_${name} DESTINATION "./")
|
||
|
|
||
|
add_executable(omohaaded_launcher_${name} ${LAUNCHER_SOURCES})
|
||
|
target_include_directories(omohaaded_launcher_${name} PUBLIC "../qcommon")
|
||
|
target_compile_definitions(omohaaded_launcher_${name} PRIVATE NO_RC_MANIFEST=1 TARGET_GAME=${type} DEDICATED=1)
|
||
|
target_compile_features(omohaaded_launcher_${name} PRIVATE cxx_std_17)
|
||
|
set_target_properties(omohaaded_launcher_${name} PROPERTIES OUTPUT_NAME "launch_omohaaded_${name}${TARGET_BIN_SUFFIX}")
|
||
|
|
||
|
INSTALL(TARGETS omohaaded_launcher_${name} DESTINATION "./")
|
||
|
endfunction()
|
||
|
|
||
|
create_launcher(base 0)
|
||
|
create_launcher(spearhead 1)
|
||
|
create_launcher(breakthrough 2)
|