diff --git a/CMakeLists.txt b/CMakeLists.txt index a288d867..ff683420 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,10 @@ add_compile_options( "$<$:${NEXO_COMPILER_FLAGS_RELEASE}>" ) +# Prevent Visual Studio (or other build tools) from creating per config sub-directories (e.g. Debug, Release) +# Useful to look for resource files relative to the executable path +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) + if (NEXO_COVERAGE) message(STATUS "Coverage enabled, adding flags: ${NEXO_COVERAGE_FLAGS}") add_compile_options("$<$:${NEXO_COVERAGE_FLAGS}>") diff --git a/scripts/install.cmake b/scripts/install.cmake index 3866c20a..778a3626 100755 --- a/scripts/install.cmake +++ b/scripts/install.cmake @@ -14,9 +14,6 @@ cmake_minimum_required(VERSION 3.28) -# Set output directories -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - # Installation rules install(TARGETS nexoEditor RUNTIME DESTINATION bin diff --git a/src/game_engine/ecs/CMakeLists.txt b/src/game_engine/ecs/CMakeLists.txt index 9c4f1dad..7c5f18a8 100644 --- a/src/game_engine/ecs/CMakeLists.txt +++ b/src/game_engine/ecs/CMakeLists.txt @@ -7,10 +7,6 @@ set(ROOT "../../..") include_directories(${ROOT}/include) -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ../${ROOT}/lib) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ../${ROOT}/lib) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ../${ROOT}/bin) - add_library(controls STATIC systems/Controls.cpp) add_library(draw STATIC systems/Draw.cpp) add_library(physics STATIC systems/Physics.cpp)