Skip to content
Snippets Groups Projects
Commit 76f19a23 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Merge branch 'MacOS' into 'master'

Fix MacOS build

See merge request hallc/analyzer_software/hcana!1
parents a9c8ecde eb4644ae
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,8 @@ project(hcana VERSION 0.90 LANGUAGES CXX)
option(HCANA_BUILTIN_PODD "Use built-in Podd submodule (default: YES)" OFF)
include(cmake/os.cmake)
find_package(ROOT 6.0 REQUIRED CONFIG)
include(${ROOT_USE_FILE})
......
......@@ -15,3 +15,10 @@ include("@PACKAGE_TARGETS_FILE@")
check_required_components(@PROJECT_NAME_UC@)
## Extra rpath stuff for MacOS
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_INSTALL_RPATH
${CMAKE_INSTALL_RPATH}
"@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@")
message("Podd: set rpath to ${CMAKE_INSTALL_RPATH}")
endif()
## OSX/homebrew version of root6 installs its cmake macros in a non-standard
## location. This might be an issue on other systems as well.
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} $ENV{ROOTSYS}/etc/root/cmake)
endif()
## Get rid of rpath warning on OSX
## Set correct rpath on MacOs
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH
${CMAKE_INSTALL_RPATH}
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
message("Setting RPath to ${CMAKE_INSTALL_RPATH}")
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment