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) exec_program (mktemp ARGS -d OUTPUT_VARIABLE black_hole)
install (PROGRAMS ${nothing} DESTINATION ${black_hole}) install (PROGRAMS ${nothing} DESTINATION ${black_hole})
else () else ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if (PROJECT_NAME STREQUAL "damask-grid") if (PROJECT_NAME STREQUAL "damask-grid")
install (PROGRAMS ${PROJECT_BINARY_DIR}/src/DAMASK_spectral install (TARGETS DAMASK_spectral RUNTIME)
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
elseif (PROJECT_NAME STREQUAL "damask-mesh") elseif (PROJECT_NAME STREQUAL "damask-mesh")
install (PROGRAMS ${PROJECT_BINARY_DIR}/src/DAMASK_FEM install (TARGETS DAMASK_FEM RUNTIME)
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
endif () endif ()
endif () endif ()