38 lines
1.2 KiB
CMake
38 lines
1.2 KiB
CMake
cmake_minimum_required(VERSION 3.26)
|
|
project(ConjureEngineProject)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
# Set the default build type to Debug if not specified by the user
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type (default Debug)" FORCE)
|
|
endif()
|
|
|
|
message(${CMAKE_BUILD_TYPE})
|
|
|
|
# Set architecture
|
|
if(NOT DEFINED ARCH)
|
|
set(ARCH x64) # Default to x64 architecture
|
|
endif()
|
|
|
|
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build)
|
|
|
|
# Include the Conan-generated files
|
|
|
|
IF (WIN32)
|
|
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/generators")
|
|
include("${CMAKE_BINARY_DIR}/generators/conan_toolchain.cmake")
|
|
ELSE()
|
|
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}/generators")
|
|
include("${CMAKE_BINARY_DIR}/generators/conan_toolchain.cmake")
|
|
ENDIF()
|
|
|
|
# Set common output directories
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/intermediates/${CMAKE_BUILD_TYPE}/${ARCH}/${PROJECT_NAME})
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}/${ARCH}/${PROJECT_NAME})
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}/${ARCH}/${PROJECT_NAME})
|
|
|
|
# Add subdirectories for engine and demo
|
|
add_subdirectory(./ConjureEngine)
|
|
add_subdirectory(./Demo1)
|