more standard way of installing executable

This commit is contained in:
Martin Diehl 2019-04-26 16:36:36 +02:00
parent 5020d8204e
commit ed2d64d876
1 changed files with 3 additions and 4 deletions

View File

@ -474,11 +474,10 @@ if (CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY")
exec_program (mktemp ARGS -d OUTPUT_VARIABLE black_hole)
install (PROGRAMS ${nothing} DESTINATION ${black_hole})
else ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if (PROJECT_NAME STREQUAL "damask-grid")
install (PROGRAMS ${PROJECT_BINARY_DIR}/src/DAMASK_spectral
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install (TARGETS DAMASK_spectral RUNTIME)
elseif (PROJECT_NAME STREQUAL "damask-mesh")
install (PROGRAMS ${PROJECT_BINARY_DIR}/src/DAMASK_FEM
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install (TARGETS DAMASK_FEM RUNTIME)
endif ()
endif ()