Skip to content

Commit db26e01

Browse files
pbosettiCopilot
andcommitted
Add platform-specific output directory settings for plugin executables in CMake
Co-authored-by: Copilot <copilot@github.com>
1 parent 5994050 commit db26e01

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ macro(add_plugin name)
109109
add_library(${name} SHARED ${SRC_DIR}/${name}.cpp ${plugin_SRCS})
110110
add_executable(${name}_main ${SRC_DIR}/${name}.cpp ${plugin_SRCS})
111111
target_link_libraries(${name}_main PRIVATE pugg ${plugin_LIBS})
112-
set_target_properties(${name}_main PROPERTIES OUTPUT_NAME ${name})
112+
if(WIN32)
113+
set_target_properties(${name}_main PROPERTIES
114+
OUTPUT_NAME ${name}
115+
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/exe"
116+
PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/exe")
117+
else()
118+
set_target_properties(${name}_main PROPERTIES OUTPUT_NAME ${name})
119+
endif()
113120
set(${name}_EXEC ${name})
114121
list(APPEND TARGET_LIST ${name}_main)
115122
endif()

0 commit comments

Comments
 (0)