apply cmake file formatting

This commit is contained in:
Andrej730
2026-01-26 13:00:09 +05:00
parent 44f0a4a39b
commit dbb4e91d55
5 changed files with 37 additions and 43 deletions
+9 -5
View File
@@ -13,7 +13,14 @@ include(CMakeFindDependencyMacro)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_COMPONENTS system program_options regex thread date_time iostreams)
set(Boost_COMPONENTS
system
program_options
regex
thread
date_time
iostreams
)
find_dependency(Boost CONFIG COMPONENTS ${Boost_COMPONENTS})
find_dependency(Eigen3 CONFIG)
@@ -39,7 +46,6 @@ if(IFCOPENSHELL_IFCXML)
find_dependency(LibXml2 CONFIG)
endif()
if(IFCOPENSHELL_WITH_CGAL)
find_dependency(CGAL CONFIG)
endif()
@@ -48,9 +54,7 @@ if(IFCOPENSHELL_WITH_OPENCASCADE)
find_dependency(OpenCASCADE CONFIG)
if(OpenCASCADE_VERSION VERSION_LESS "7.7.0")
# cmake configs < 7.7.0 were not adding include directories to targets automatically.
set_target_properties(TKernel PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OpenCASCADE_INCLUDE_DIR}"
)
set_target_properties(TKernel PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OpenCASCADE_INCLUDE_DIR}")
endif()
endif()
+7 -3
View File
@@ -29,9 +29,13 @@ foreach(file ${files})
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
"@CMAKE_COMMAND@"
ARGS
"-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE
rm_out
RETURN_VALUE
rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
+13 -18
View File
@@ -1,14 +1,10 @@
#Look for an executable called sphinx-build
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
DOC "Path to sphinx-build executable")
find_program(SPHINX_EXECUTABLE NAMES sphinx-build DOC "Path to sphinx-build executable")
include(FindPackageHandleStandardArgs)
#Handle standard arguments to find_package like REQUIRED and QUIET
find_package_handle_standard_args(Sphinx
"Failed to find sphinx-build executable"
SPHINX_EXECUTABLE)
find_package_handle_standard_args(Sphinx "Failed to find sphinx-build executable" SPHINX_EXECUTABLE)
find_package(Doxygen REQUIRED)
#find_package(Sphinx REQUIRED)
@@ -16,25 +12,24 @@ find_package(Doxygen REQUIRED)
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR})
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/docs/sphinx)
MESSAGE(STATUS "SPHINX BUILD ${CMAKE_CURRENT_BINARY_DIR}")
message(STATUS "SPHINX BUILD ${CMAKE_CURRENT_BINARY_DIR}")
file(MAKE_DIRECTORY ./output/doxygen)
if (DOXYGEN_FOUND)
add_custom_target(Sphinx ALL
COMMAND
${SPHINX_EXECUTABLE} -v -T -b html
${SPHINX_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/output
if(DOXYGEN_FOUND)
add_custom_target(
Sphinx
ALL
COMMAND ${SPHINX_EXECUTABLE} -v -T -b html ${SPHINX_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/output
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/output
COMMENT "Generating documentation with Sphinx")
COMMENT "Generating documentation with Sphinx"
)
# add_custom_target(ifcopenshell_python_docs ALL
# add_custom_target(ifcopenshell_python_docs ALL
# COMMAND make html
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../src/ifcblenderexport/docs
# OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/../src/ifcblenderexport/docs
# COMMENT "Generating documentation with Sphinx")
else (DOXYGEN_FOUND)
else(DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
endif(DOXYGEN_FOUND)
+1 -7
View File
@@ -29,13 +29,7 @@ endif()
find_package(Eigen3 REQUIRED)
target_link_libraries(
IfcGeom
${mapping_libraries}
${CMAKE_THREAD_LIBS_INIT}
"Eigen3::Eigen"
${CGAL_LIBRARIES}
)
target_link_libraries(IfcGeom ${mapping_libraries} ${CMAKE_THREAD_LIBS_INIT} "Eigen3::Eigen" ${CGAL_LIBRARIES})
if(WITH_OPENCASCADE)
target_link_libraries(IfcGeom TKernel)
+1 -4
View File
@@ -43,7 +43,4 @@ endforeach()
set(kernel_libraries ${kernel_libraries} PARENT_SCOPE)
install(
FILES ifc_geomlibrary_api.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ifcgeom/kernels/"
)
install(FILES ifc_geomlibrary_api.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ifcgeom/kernels/")