From 1dacf19af3d96059725c6598bf3c0145cba2cef6 Mon Sep 17 00:00:00 2001 From: MrLetsplay2003 Date: Sat, 9 Sep 2023 14:13:38 +0200 Subject: [PATCH] Use project dir in CMakeLists --- CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e4e53f..ea8f893 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,18 +19,18 @@ message("Build kekgame: ${KEKENGINE_BUILD_KEKGAME}") message("Build with VR support: ${KEKENGINE_VR}") message("Target platform: ${KEKENGINE_TARGET_PLATFORM}") -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) -set(KEKENGINE_RESOURCE_DIR "${CMAKE_SOURCE_DIR}/src/kekengine/res") -set(KEKGAME_RESOURCE_DIR "${CMAKE_SOURCE_DIR}/src/kekgame/res") +set(KEKENGINE_RESOURCE_DIR "${PROJECT_SOURCE_DIR}/src/kekengine/res") +set(KEKGAME_RESOURCE_DIR "${PROJECT_SOURCE_DIR}/src/kekgame/res") -file(GLOB_RECURSE KEKENGINE_SOURCE_FILES "${CMAKE_SOURCE_DIR}/src/kekengine/cpp/*.cpp") +file(GLOB_RECURSE KEKENGINE_SOURCE_FILES "${PROJECT_SOURCE_DIR}/src/kekengine/cpp/*.cpp") file(GLOB_RECURSE KEKENGINE_RESOURCE_FILES "${KEKENGINE_RESOURCE_DIR}/*") file(GLOB_RECURSE KEKENGINE_RELATIVE_RESOURCE_FILES RELATIVE ${KEKENGINE_RESOURCE_DIR} "${KEKENGINE_RESOURCE_DIR}/*") -file(GLOB_RECURSE KEKGAME_SOURCE_FILES "${CMAKE_SOURCE_DIR}/src/kekgame/cpp/*.cpp") +file(GLOB_RECURSE KEKGAME_SOURCE_FILES "${PROJECT_SOURCE_DIR}/src/kekgame/cpp/*.cpp") file(GLOB_RECURSE KEKGAME_RESOURCE_FILES "${KEKGAME_RESOURCE_DIR}/*") file(GLOB_RECURSE KEKGAME_RELATIVE_RESOURCE_FILES RELATIVE ${KEKGAME_RESOURCE_DIR} "${KEKGAME_RESOURCE_DIR}/*")