-
-
Notifications
You must be signed in to change notification settings - Fork 901
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
66 lines (56 loc) · 1.95 KB
/
CMakeLists.txt
File metadata and controls
66 lines (56 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
file(GLOB IFCPARSE_H_FILES_ALL *.h)
file(GLOB IFCPARSE_CPP_FILES_ALL *.cpp)
foreach(file ${IFCPARSE_H_FILES_ALL})
get_filename_component(filename "${file}" NAME)
list(APPEND IFCPARSE_H_FILES "${file}")
endforeach()
foreach(file ${IFCPARSE_CPP_FILES_ALL})
get_filename_component(filename "${file}" NAME)
list(APPEND IFCPARSE_CPP_FILES "${file}")
endforeach()
message(STATUS "SCHEMA_VERSIONS from ifcparse: ${SCHEMA_VERSIONS}")
foreach(schema ${SCHEMA_VERSIONS})
list(APPEND IFCPARSE_H_FILES
schemas/Ifc${schema}.h
schemas/Ifc${schema}-definitions.h
)
list(APPEND IFCPARSE_CPP_FILES
schemas/Ifc${schema}.cpp
schemas/Ifc${schema}-schema.cpp
)
endforeach()
list(APPEND IFCPARSE_H_FILES
schemas/Header_section_schema.h
)
list(APPEND IFCPARSE_CPP_FILES
schemas/Header_section_schema.cpp
schemas/Header_section_schema-schema.cpp
)
set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES})
add_library(IfcParse ${IFCPARSE_FILES})
add_library(parse ALIAS IfcParse)
target_compile_definitions(IfcParse PUBLIC ${SCHEMA_DEFINITIONS})
if(USE_MMAP)
target_compile_definitions(IfcParse PUBLIC USE_MMAP)
endif()
if(WITH_ROCKSDB)
target_compile_definitions(IfcParse PUBLIC IFOPSH_WITH_ROCKSDB)
set(SWIG_DEFINES ${SWIG_DEFINES} -DIFOPSH_WITH_ROCKSDB PARENT_SCOPE)
endif()
set_target_properties(IfcParse PROPERTIES COMPILE_FLAGS -DIFC_PARSE_EXPORTS VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
if(WASM_BUILD)
target_link_libraries(IfcParse plugin ${BCRYPT_LIBRARIES})
else()
target_link_libraries(IfcParse plugin ${Boost_LIBRARIES} ${BCRYPT_LIBRARIES})
endif()
if(WITH_ROCKSDB)
target_link_libraries(IfcParse RocksDB::rocksdb)
if(WITH_ZSTD)
target_link_libraries(IfcParse zstd::libzstd_static)
endif()
endif()
# CMake installation targets
install(FILES ${IFCPARSE_H_FILES}
DESTINATION ${INCLUDEDIR}/ifcparse
)
install(TARGETS IfcParse)