--- fem/src/CMakeLists.txt.orig 2015-08-18 12:26:58 UTC +++ fem/src/CMakeLists.txt @@ -131,9 +131,9 @@ ENDIF() ADD_EXECUTABLE(Solver_TGT Solver.F90) - SET_TARGET_PROPERTIES(Solver_TGT PROPERTIES OUTPUT_NAME ${ELMERSOLVER_OUTPUT_NAME}) + SET_TARGET_PROPERTIES(Solver_TGT PROPERTIES OUTPUT_NAME "${ELMERSOLVER_OUTPUT_NAME}") IF(NOT(WIN32)) - SET_TARGET_PROPERTIES(Solver_TGT PROPERTIES INSTALL_RPATH ${ELMERSOLVER_RPATH_STRING}) + SET_TARGET_PROPERTIES(Solver_TGT PROPERTIES INSTALL_RPATH "${ELMERSOLVER_RPATH_STRING}") ENDIF() IF(NOT(WITH_MPI)) @@ -229,7 +229,7 @@ TARGET_LINK_LIBRARIES(ViewFactors ${ELME INSTALL(TARGETS ViewFactors RUNTIME DESTINATION "bin") IF(NOT(WIN32)) - SET_TARGET_PROPERTIES(ViewFactors PROPERTIES INSTALL_RPATH ${ELMERSOLVER_RPATH_STRING}) + SET_TARGET_PROPERTIES(ViewFactors PROPERTIES INSTALL_RPATH "${ELMERSOLVER_RPATH_STRING}") ENDIF() # GebhardFactors @@ -238,7 +238,7 @@ TARGET_LINK_LIBRARIES(GebhardtFactors ${ mpi_stubs elmersolver) IF(NOT(WIN32)) - SET_TARGET_PROPERTIES(GebhardtFactors PROPERTIES INSTALL_RPATH ${ELMERSOLVER_RPATH_STRING}) + SET_TARGET_PROPERTIES(GebhardtFactors PROPERTIES INSTALL_RPATH "${ELMERSOLVER_RPATH_STRING}") ENDIF() IF(WITH_Trilinos) @@ -282,9 +282,10 @@ INSTALL(DIRECTORY ${CMAKE_Fortran_MODULE IF(WITH_MPI) IF(NOT(WIN32)) - INSTALL(CODE " - EXECUTE_PROCESS(COMMAND \${CMAKE_COMMAND} -E create_symlink ElmerSolver_mpi ElmerSolver - WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX}/bin)") + # Create symlink after, to respect STAGEDIR + #INSTALL(CODE " + #EXECUTE_PROCESS(COMMAND \${CMAKE_COMMAND} -E create_symlink ElmerSolver_mpi ElmerSolver + #WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX}/bin)") ELSE() INSTALL(CODE "EXECUTE_PROCESS(COMMAND \${CMAKE_COMMAND} -E copy \${CMAKE_INSTALL_PREFIX}/bin/ElmerSolver_mpi.exe