openmohaa/code/Launcher/CMakeLists.txt
smallmodel 64f877ae80
Use the correct convention for installing the project
On Win32:
- Binaries and libraries will be installed by default in <PREFIX>/bin
- The prefix is set to `Program Files/openmohaa` by default

On Unix:
- Binaries and libraries will be installed by default in <PREFIX>/lib/openmohaa
- Shared data will be installed in <PREFIX>/share/applications, <PREFIX>/share/metainfo and <PREFIX>/share/icons
- The prefix is set to `/usr/local` by default
2024-11-21 19:49:43 +01:00

36 lines
1.7 KiB
CMake

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)
if (NOT BUILD_NO_CLIENT)
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 ${CMAKE_INSTALL_BINDIR}/${BIN_INSTALL_SUBDIR})
endif()
#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 ${CMAKE_INSTALL_BINDIR}/${PROJECT_INSTALL_SUBDIR})
endfunction()
create_launcher(base 0)
create_launcher(spearhead 1)
create_launcher(breakthrough 2)