File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,16 +65,19 @@ target_link_libraries(ifc-dom PUBLIC ifc-reader)
6565target_compile_features (ifc-dom PUBLIC cxx_std_23 )
6666target_include_directories (ifc-dom PUBLIC "\$ <BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include>" )
6767
68- # The `ifc` tool executable.
69- add_executable (
70- ifc
71- src/tools/ifc.cxx
72- )
73- add_executable (Microsoft.IFC::Tool ALIAS ifc )
74- set_property (TARGET ifc PROPERTY EXPORT_NAME Tool )
75- target_compile_features (ifc PUBLIC cxx_std_23 )
76- target_link_libraries (ifc ifc-reader )
77- target_include_directories (ifc PUBLIC "\$ <BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include>" )
68+ option (BUILD_TOOLS "Build the ifc tool executable" ON )
69+ if (BUILD_TOOLS)
70+ # The `ifc` tool executable.
71+ add_executable (
72+ ifc
73+ src/tools/ifc.cxx
74+ )
75+ add_executable (Microsoft.IFC::Tool ALIAS ifc )
76+ set_property (TARGET ifc PROPERTY EXPORT_NAME Tool )
77+ target_compile_features (ifc PUBLIC cxx_std_23 )
78+ target_link_libraries (ifc ifc-reader )
79+ target_include_directories (ifc PUBLIC "\$ <BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include>" )
80+ endif ()
7881
7982# The IFC SDK comprises the `reader`, the `dom`, and the tool.
8083add_library (SDK INTERFACE )
Original file line number Diff line number Diff line change @@ -19,10 +19,12 @@ install(
1919 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
2020)
2121
22- install (
23- TARGETS ifc
24- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} "
25- )
22+ if (TARGET ifc)
23+ install (
24+ TARGETS ifc
25+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} "
26+ )
27+ endif ()
2628
2729install (
2830 TARGETS ifc-dom ifc-reader SDK
You can’t perform that action at this time.
0 commit comments