mirror of
https://github.com/yoboujon/yoyo_card.git
synced 2025-06-08 12:50:49 +02:00
46 lines
No EOL
1.3 KiB
CMake
46 lines
No EOL
1.3 KiB
CMake
# Project
|
|
project(
|
|
game
|
|
VERSION 1.0.0
|
|
DESCRIPTION "Gabo card game recreation."
|
|
HOMEPAGE_URL "https://www.etheryo.fr"
|
|
LANGUAGES CXX C
|
|
)
|
|
set(TARGET game)
|
|
|
|
# Source files
|
|
set(SOURCES "${PROJECT_SOURCE_DIR}/src")
|
|
add_executable(${TARGET}
|
|
${SOURCES}/debug.cpp
|
|
${SOURCES}/main.cpp
|
|
)
|
|
|
|
# Include folders
|
|
target_include_directories(${TARGET} PRIVATE "${PROJECT_SOURCE_DIR}/include")
|
|
target_include_directories(${TARGET} PRIVATE "${raylib_INCLUDE_DIRS}")
|
|
target_include_directories(${TARGET} PRIVATE "${imgui_INCLUDE_DIRS}")
|
|
target_include_directories(${TARGET} PRIVATE "${rlImGui_INCLUDE_DIRS}")
|
|
|
|
# Libraries
|
|
target_link_libraries(${TARGET} raylib imgui rlimgui)
|
|
|
|
# Compilation depending on the platform
|
|
if(MSVC)
|
|
# Build the program as a window-only (no cmd)
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
target_link_options(${TARGET} PRIVATE "/SUBSYSTEM:WINDOWS")
|
|
target_compile_options(${TARGET} PRIVATE /W3 /WX )
|
|
else()
|
|
target_compile_options(${TARGET} PRIVATE /W3 /WX /DEBUG )
|
|
endif()
|
|
else()
|
|
target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Wpedantic -Werror)
|
|
endif()
|
|
|
|
# Output folder
|
|
set_target_properties(${TARGET}
|
|
PROPERTIES
|
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/game"
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/game"
|
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/game"
|
|
) |