Skip to content

Commit

Permalink
Don't do tests if downloads are off, since they require googletest.
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Sep 28, 2024
1 parent 412dcd0 commit 9bb9a8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ if(EMSCRIPTEN)
return()
endif()


# CMake exports
configure_file(manifoldConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/manifoldConfig.cmake @ONLY)
include(CMakePackageConfigHelpers)
Expand All @@ -322,18 +323,22 @@ write_basic_package_version_file(
VERSION ${MANIFOLD_VERSION}
COMPATIBILITY SameMajorVersion
)

# Location of inputs for CMake find_package - see:
# https://cmake.org/cmake/help/latest/command/find_package.html
set(EXPORT_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake)

install(EXPORT manifoldTargets
NAMESPACE manifold::
DESTINATION ${EXPORT_INSTALL_DIR}/manifold
)
# TODO - do we need different destinations for this for different platforms?
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/cmake/manifoldConfigVersion.cmake
${CMAKE_CURRENT_BINARY_DIR}/manifoldConfig.cmake
DESTINATION ${EXPORT_INSTALL_DIR}/manifold
)


# PkgConfig file
if(MANIFOLD_CROSS_SECTION)
set(TEMPLATE_OPTIONAL_CLIPPER "Clipper2")
Expand Down
3 changes: 3 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
if (NOT MANIFOLD_TEST)
return()
endif()
if (NOT MANIFOLD_DOWNLOADS)
message("Downloading is disabled, but testing requires googletest - skipping.\n")
endif()

enable_testing()

Expand Down

0 comments on commit 9bb9a8f

Please sign in to comment.