Skip to content

Commit

Permalink
feat(asset-back): prevent Visual Studio from creating per config sub dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Thyodas committed Dec 5, 2024
1 parent eb32ce5 commit a234148
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ add_compile_options(
"$<$<CONFIG:Release>:${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("$<$<CONFIG:Debug>:${NEXO_COVERAGE_FLAGS}>")
Expand Down
3 changes: 0 additions & 3 deletions scripts/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/game_engine/ecs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a234148

Please sign in to comment.