Skip to content

Commit

Permalink
Fix cmake for cmake 3.22
Browse files Browse the repository at this point in the history
When downgrading from minimum cmake 3.24 to 3.22 I forgot to remove the
newly added 'GLOBAL' specifier in find_package. This breaks find_package
calls on cmake 3.22

Packages that needed a promotion to IMPORTED_GLOBAL are now promoted
manually with set_properties.
  • Loading branch information
Ozaq committed Jan 2, 2024
1 parent 293db14 commit 494d511
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions third-party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ find_package(Boost 1.82
NO_DEFAULT_PATH
PATHS
${CMAKE_CURRENT_SOURCE_DIR}/boost-1.82.0
GLOBAL
)
set_target_properties(Boost::boost PROPERTIES IMPORTED_GLOBAL TRUE)
################################################################################
# threading
################################################################################
find_package(Threads REQUIRED GLOBAL)
find_package(Threads REQUIRED)

################################################################################
# CGAL
Expand All @@ -38,7 +38,6 @@ find_package(CGAL 5.5
NO_DEFAULT_PATH
PATHS
${CMAKE_CURRENT_SOURCE_DIR}/cgal-5.6.0
GLOBAL
)

################################################################################
Expand All @@ -50,7 +49,7 @@ add_subdirectory(poly2tri)
# Python Interpreter / CPython
################################################################################
set(Python_FIND_VIRTUALENV "FIRST")
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED GLOBAL)
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
add_subdirectory(pybind11-2.11.1)
set(Python_EXECUTABLE ${Python_EXECUTABLE} PARENT_SCOPE)

Expand Down

0 comments on commit 494d511

Please # to comment.