Specify CMAKE_RUNTIME_OUTPUT_DIRECTORY from outside of the project

Hardcoding this into the library itself means that outside consumers
cannot choose a different value. This in particular breaks the CMake
template project of ours which also tries to set this value.

As conventional wisdom dictates, its best to not touch CMAKE_ variables
unless necessary. Luckily our use of presents means we can easy move
this into the development preset.
This commit is contained in:
Chris Thrasher 2023-10-23 17:41:22 -05:00
parent e45628e2eb
commit d11615da97
No known key found for this signature in database
GPG Key ID: 56FB686C9DFC8E2C
2 changed files with 1 additions and 3 deletions

View File

@ -216,9 +216,6 @@ if(SFML_OS_MACOS)
endif()
endif()
# set the output directory for SFML DLLs and executables
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
# enable project folders
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake")

View File

@ -8,6 +8,7 @@
"cacheVariables": {
"CMAKE_CXX_EXTENSIONS": "OFF",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/build/bin",
"SFML_BUILD_EXAMPLES": "ON",
"SFML_BUILD_TEST_SUITE": "ON",
"SFML_WARNINGS_AS_ERRORS": "ON"