Skip to content

Commit d2d7d2e

Browse files
CMake - qtEditor: Replaced code for custom executable output directory by one that works with all generators
1 parent 28617ac commit d2d7d2e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

qtEditor/CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ project(qtEditor)
22

33
set(CMAKE_DEBUG_POSTFIX "_d")
44
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/bin")
5-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX})
6-
# Force MSVC_IDE to not put the executable in Debug/Release directories!
7-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_INSTALL_PREFIX})
8-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_INSTALL_PREFIX})
95

106
set(CMAKE_INCLUDE_CURRENT_DIR ON)
117
set(CMAKE_AUTOMOC ON)
@@ -60,6 +56,8 @@ add_executable(qtEditor WIN32
6056

6157
target_include_directories(qtEditor PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
6258

59+
set_target_properties(qtEditor PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/$<0:>")
60+
6361
if(WIN32)
6462
set_target_properties(qtEditor PROPERTIES DEBUG_POSTFIX _d)
6563
set_property(TARGET qtEditor PROPERTY WIN32_EXECUTABLE 0)

0 commit comments

Comments
 (0)