Skip to content

Commit 25157af

Browse files
authored
Merge pull request #1815 from kbenzie/benie/pi2ur-fix-windows
Don't use $<CONFIG> in runtime output dir
2 parents 0cbacd8 + c2dc015 commit 25157af

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,13 @@ include(Assertions)
7676
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
7777
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
7878
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
79-
if(MSVC)
80-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<CONFIG>)
81-
endif()
8279

8380
# Define rpath for libraries so that adapters can be found automatically
8481
set(CMAKE_BUILD_RPATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
8582

8683
# Define a path for custom commands to work around MSVC
8784
set(CUSTOM_COMMAND_BINARY_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
88-
if(MSVC)
85+
if(CMAKE_SYSTEM_NAME STREQUAL Windows AND NOT CMAKE_GENERATOR STREQUAL Ninja)
8986
# MSVC implicitly adds $<CONFIG> to the output path
9087
set(CUSTOM_COMMAND_BINARY_DIR ${CUSTOM_COMMAND_BINARY_DIR}/$<CONFIG>)
9188
endif()

0 commit comments

Comments
 (0)