mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 11:53:44 +00:00
Try rpath fix for shared build
This commit is contained in:
@@ -41,6 +41,16 @@ macro(SET_INSTALL_RPATHS _target _paths)
|
|||||||
set_target_properties(${_target} PROPERTIES INSTALL_RPATH "${${_target}_rpaths}")
|
set_target_properties(${_target} PROPERTIES INSTALL_RPATH "${${_target}_rpaths}")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(SET_INSTALL_SELF_RPATH _target)
|
||||||
|
if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
SET_INSTALL_RPATHS(${_target} "${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
elseif(APPLE)
|
||||||
|
SET_INSTALL_RPATHS(${_target} "@loader_path")
|
||||||
|
else()
|
||||||
|
SET_INSTALL_RPATHS(${_target} "$ORIGIN")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
function(ifcopenshell_plugin_target TARGET)
|
function(ifcopenshell_plugin_target TARGET)
|
||||||
set_target_properties(${TARGET} PROPERTIES PREFIX "")
|
set_target_properties(${TARGET} PROPERTIES PREFIX "")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ add_library(IfcGeom ${SCHEMA_AGNOSTIC_FILES})
|
|||||||
set_target_properties(IfcGeom PROPERTIES
|
set_target_properties(IfcGeom PROPERTIES
|
||||||
OUTPUT_NAME "ifcopenshell.geometry"
|
OUTPUT_NAME "ifcopenshell.geometry"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if((NOT WIN32) AND BUILD_SHARED_LIBS AND NOT WASM_BUILD AND NOT CREATE_BUNDLE AND NOT CMAKE_INSTALL_RPATH AND COMMAND SET_INSTALL_SELF_RPATH)
|
||||||
|
SET_INSTALL_SELF_RPATH(IfcGeom)
|
||||||
|
endif()
|
||||||
set_target_properties(IfcGeom PROPERTIES COMPILE_FLAGS -DIFC_GEOM_EXPORTS)
|
set_target_properties(IfcGeom PROPERTIES COMPILE_FLAGS -DIFC_GEOM_EXPORTS)
|
||||||
if (NOT CREATE_BUNDLE)
|
if (NOT CREATE_BUNDLE)
|
||||||
set_target_properties(IfcGeom PROPERTIES VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
set_target_properties(IfcGeom PROPERTIES VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ add_library(IfcParse ${IFCPARSE_FILES})
|
|||||||
set_target_properties(IfcParse PROPERTIES
|
set_target_properties(IfcParse PROPERTIES
|
||||||
OUTPUT_NAME "ifcopenshell.parse"
|
OUTPUT_NAME "ifcopenshell.parse"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if((NOT WIN32) AND BUILD_SHARED_LIBS AND NOT WASM_BUILD AND NOT CREATE_BUNDLE AND NOT CMAKE_INSTALL_RPATH AND COMMAND SET_INSTALL_SELF_RPATH)
|
||||||
|
SET_INSTALL_SELF_RPATH(IfcParse)
|
||||||
|
endif()
|
||||||
target_compile_definitions(IfcParse PUBLIC ${SCHEMA_DEFINITIONS})
|
target_compile_definitions(IfcParse PUBLIC ${SCHEMA_DEFINITIONS})
|
||||||
if(USE_MMAP)
|
if(USE_MMAP)
|
||||||
target_compile_definitions(IfcParse PUBLIC USE_MMAP)
|
target_compile_definitions(IfcParse PUBLIC USE_MMAP)
|
||||||
|
|||||||
Reference in New Issue
Block a user