# 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}/main.cpp ) # Include folders target_include_directories(${TARGET} PRIVATE "${PROJECT_SOURCE_DIR}/include") target_include_directories(${TARGET} PRIVATE "${raylib_INCLUDE_DIRS}") # Libraries target_link_libraries(${TARGET} raylib) # 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" )