Skip to content
Snippets Groups Projects
Commit 48e8a9c6 authored by Riccardo Maria Bianchi's avatar Riccardo Maria Bianchi :sunny:
Browse files

Revert "Update version number and Add installation RPATH settings. This fix...

Revert "Update version number and Add installation RPATH settings. This fix installation problems on all platforms."

This reverts commit 9a2ad13e.
parent b1cfdd52
No related branches found
No related tags found
No related merge requests found
Pipeline #1393942 passed
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
# Set up the project. # Set up the project.
cmake_minimum_required( VERSION 3.1 ) cmake_minimum_required( VERSION 3.1 )
project( "GeoModelCore" VERSION 3.1.1 LANGUAGES CXX ) project( "GeoModelCore" VERSION 2.0.0 LANGUAGES CXX )
# Set default build options. # Set default build options.
set( CMAKE_BUILD_TYPE "Release" CACHE STRING "CMake build mode to use" ) set( CMAKE_BUILD_TYPE "Release" CACHE STRING "CMake build mode to use" )
set( CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard used for the build" ) set( CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard used for the build" )
set( CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "(Dis)allow using GNU extensions" ) set( CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "(Dis)allow using GNU extensions" )
# Make the module directory visible to CMake. # Make the module directory visible to CMake.
...@@ -18,36 +18,6 @@ include( SetupEigen3 ) ...@@ -18,36 +18,6 @@ include( SetupEigen3 )
# Use the GNU install directory names. # Use the GNU install directory names.
include( GNUInstallDirs ) include( GNUInstallDirs )
# Set global installation RPATH settings
# Docs: https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling#always-full-rpath
# -- Set macOS settings
if( APPLE )
# With these settings you are able to run the programs directly from the build tree.
# But the RPATH is cleared when installing the executable.
# So we have to configure the RPATH handling farther, after this instruction.
SET(CMAKE_MACOSX_RPATH 1)
endif()
# -- Set settings for all platforms
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
# set the RPATH used for installed libraries
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" )
# add the automatically determined parts of the RPATH
# which points to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
message("Setting RPATH for non-system install directory...")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif("${isSystemDir}" STREQUAL "-1")
# Set up the build of the two libraries of the project. # Set up the build of the two libraries of the project.
add_subdirectory( GeoGenericFunctions ) add_subdirectory( GeoGenericFunctions )
add_subdirectory( GeoModelKernel ) add_subdirectory( GeoModelKernel )
......
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