Commit 56e6678b authored by Matthias Möller's avatar Matthias Möller
Browse files

set output directory to final destination for executables

(cpack ignores additional files)

refs #2418

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20398 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 00806c4d
...@@ -748,14 +748,21 @@ function (acg_add_executable _target) ...@@ -748,14 +748,21 @@ function (acg_add_executable _target)
# set common target properties defined in common.cmake # set common target properties defined in common.cmake
acg_set_target_props (${_target}) acg_set_target_props (${_target})
if (WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) if (WIN32)
set (OUTPUT_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/")
set_target_properties(${_target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR})
foreach(CONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${CONFIG} UPCONFIG)
set_target_properties(${_target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${UPCONFIG} ${OUTPUT_DIR})
endforeach()
elseif (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)
add_custom_command (TARGET ${_target} POST_BUILD add_custom_command (TARGET ${_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E COMMAND ${CMAKE_COMMAND} -E
copy_if_different copy_if_different
$<TARGET_FILE:${_target}> $<TARGET_FILE:${_target}>
${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/$<TARGET_FILE_NAME:${_target}>) ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/$<TARGET_FILE_NAME:${_target}>)
endif (WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) endif ()
if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE) if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE)
install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_BINDIR}) install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_BINDIR})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment