cmake export - export some variables to inspect installation

This commit is contained in:
Andrej730
2025-12-12 18:32:47 +05:00
parent d5210e0d75
commit 1d7d0f6d05
2 changed files with 11 additions and 3 deletions
+6
View File
@@ -1,5 +1,11 @@
@PACKAGE_INIT@
# Variable to inspect installed schema versions.
set(IFCOPENSHELL_SCHEMA_VERSIONS @SCHEMA_VERSIONS@)
set(IFCOPENSHELL_WITH_OPENCASCADE @WITH_OPENCASCADE@)
include("${CMAKE_CURRENT_LIST_DIR}/@CONFIG_TARGETS_FILENAME@")
check_required_components("@PROJECT_NAME@")
+5 -3
View File
@@ -37,9 +37,11 @@ if(STANDALONE_PROJECT)
find_package(RocksDB CONFIG REQUIRED)
find_package(LibXml2 CONFIG REQUIRED)
find_package(IfcOpenShell CONFIG REQUIRED)
set(SCHEMA_VERSIONS ${IFCOPENSHELL_SCHEMA_VERSIONS})
set(WITH_OPENCASCADE ${IFCOPENSHELL_WITH_OPENCASCADE})
endif()
if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "2x3")
if(SCHEMA_VERSIONS MATCHES "2x3")
add_executable(IfcParseExamples IfcParseExamples.cpp)
if(STANDALONE_PROJECT)
@@ -55,7 +57,7 @@ if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "2x3")
endif()
install(TARGETS IfcParseExamples)
if(STANDALONE_PROJECT OR WITH_OPENCASCADE)
if(WITH_OPENCASCADE)
add_executable(IfcOpenHouse IfcOpenHouse.cpp)
add_executable(IfcAdvancedHouse IfcAdvancedHouse.cpp)
add_library(IfcHouseInterface INTERFACE)
@@ -84,7 +86,7 @@ if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "2x3")
endif()
endif()
if(STANDALONE_PROJECT OR SCHEMA_VERSIONS MATCHES "4x3_add2")
if(SCHEMA_VERSIONS MATCHES "4x3_add2")
add_executable(IfcAlignment IfcAlignment.cpp)
add_executable(IfcSimplifiedAlignment IfcSimplifiedAlignment.cpp)
add_library(IfcAlignmentInterface INTERFACE)