diff options
| author | Joshua Vandaƫle <joshua@vandaele.software> | 2025-12-11 03:25:28 +0100 |
|---|---|---|
| committer | Joshua Vandaƫle <joshua@vandaele.software> | 2026-07-24 03:45:13 +0200 |
| commit | 6da4bc38e1424e743df01face292a5730aadd571 (patch) | |
| tree | e223f69ec18ebb8fde98924dc9d7918a15fb5438 /CMakeLists.txt | |
| parent | 3d9f46cd64eeedbb7ac92039002d505ca6e594c7 (diff) | |
CMake: Unify output directory
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ba9772bf7..8a01fad918 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,20 +174,11 @@ if(CMAKE_SYSROOT) set(ENV{PKG_CONFIG_SYSROOT_DIR} "${CMAKE_SYSROOT}") endif() -# Set where the binary files will be built. The program will not execute from -# here. You must run "make install" to install these to the proper location -# as defined above. -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Binaries) - -if (WIN32) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/Binary) - - if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64") - string(APPEND CMAKE_RUNTIME_OUTPUT_DIRECTORY /x64) - elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") - string(APPEND CMAKE_RUNTIME_OUTPUT_DIRECTORY /ARM64) - endif() -endif() +# Output directory for the Dolphin binary +# We need to use a generator expression here to ensure that multi-config generators +# (like Visual Studio) put the binaries in the right place. +# See https://cmake.org/cmake/help/v4.2/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.html +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}/Binaries>) # Output directory for PDB files. PDBs are only generated on Windows with MSVC. # We set a common directory for all PDBs to avoid littering the Binaries/ directory. |
