diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2015-05-01 03:52:17 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2015-05-01 03:52:17 +0000 |
| commit | 3c185d781ac7a7031397c6651baf046d900efc3a (patch) | |
| tree | 0ceed4b570a0c57a48e7bbff12c255f751959ef0 /CMakeLists.txt | |
| parent | Fixed crash bug due to some overlooked function changed in the recent merge. (diff) | |
| download | inkscape-3c185d781ac7a7031397c6651baf046d900efc3a.tar.gz inkscape-3c185d781ac7a7031397c6651baf046d900efc3a.zip | |
cmake: Fix osx-related issues with cmake-build
Add new helper function to retrive pkg-config variables in Cmake;
use paths defined as environment variables for builds on
OS X (useful if MacPorts is not installed into default prefix);
check backend of GTK2 on OS X in main cmake file (x11|quartz).
(bzr r14080)
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 905f714af..697006278 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,30 @@ if(CMAKE_COMPILER_IS_GNUCC) endif() endif() +# +# Set platform defaults (originally copied from darktable) +# +if(APPLE) + message("-- Mac OS X build detected, setting default features") + # prefer macports and/or user-installed libraries over system ones + #LIST(APPEND CMAKE_PREFIX_PATH /opt/local /usr/local) + set(CMAKE_FIND_FRAMEWORK "LAST") + + # test and display relevant env variables + if(DEFINED ENV{CMAKE_PREFIX_PATH}) + message("CMAKE_PREFIX_PATH: $ENV{CMAKE_PREFIX_PATH}") + endif() + if(DEFINED ENV{GTKMM_BASEPATH}) + message("GTKMM_BASEPATH: $ENV{GTKMM_BASEPATH}") + endif() + + # detect current GTK+ backend + include(${CMAKE_SOURCE_DIR}/CMakeScripts/HelperFunctions.cmake) + pkg_check_variable(gtk+-2.0 target) + message("GTK2 backend: ${GTK+_2.0_TARGET}") + +endif(APPLE) + #----------------------------------------------------------------------------- # Redirect output files |
