Browse Source

do not force CMAKE_INSTALL_LIBDIR to be an absolute path

master
wmayer 2 months ago
parent
commit
7d8c2060a8
2 changed files with 4 additions and 8 deletions
  1. 0
    6
      CMakeLists.txt
  2. 4
    2
      cMake/FreeCadMacros.cmake

+ 0
- 6
CMakeLists.txt View File

@@ -154,12 +154,6 @@ set(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and
# Don't set it without manual adoption of LibDir variable in src/App/FreeCADInit.py
set(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")

if (NOT WIN32)
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
endif(NOT WIN32)

set(PYCXX_INCLUDE_DIR
"${CMAKE_SOURCE_DIR}/src" CACHE PATH
"Path to the directory containing PyCXX's CXX/Config.hxx include file")

+ 4
- 2
cMake/FreeCadMacros.cmake View File

@@ -237,8 +237,10 @@ MACRO(SET_BIN_DIR ProjectName OutputName)
# FreeCADBase, SMDS, Driver, MEFISTO2 and area-native libs don't depend on parts from CMAKE_INSTALL_LIBDIR
if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2|area-native)$")
if(${ARGC} STREQUAL 4)
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
else(${ARGC} STREQUAL 4)
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${ARGV3})
elseif(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
else()
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
endif()
endif()

Loading…
Cancel
Save