Skip to content

Commit

Permalink
Merge pull request #2337 from tjhei/8_4_pr2336
Browse files Browse the repository at this point in the history
[8.4] take over #2336: CMake: Fix rpath handling on Mac OSX
  • Loading branch information
bangerth committed Mar 11, 2016
2 parents c8c678e + e7cf2d4 commit a95702b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## ---------------------------------------------------------------------
##
## Copyright (C) 2012 - 2015 by the deal.II authors
## Copyright (C) 2012 - 2016 by the deal.II authors
##
## This file is part of the deal.II library.
##
Expand Down Expand Up @@ -76,12 +76,20 @@ FOREACH(build ${DEAL_II_BUILD_TYPES})
LINKER_LANGUAGE "CXX"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}"
COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}}"
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}"
)

IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
PROPERTIES
MACOSX_RPATH OFF
BUILD_WITH_INSTALL_RPATH OFF
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}"
)
ENDIF()

# Under Windows (MSVC) cmake will always generate multi-configuration
# projects. When building on the command line with 'cmake --build .',
# release and debug builds of the library are done with the default 'Debug'
Expand Down

0 comments on commit a95702b

Please sign in to comment.