From da6c68971b271ca91afc21e39a9aa12aed251fe0 Mon Sep 17 00:00:00 2001 From: Sandro Elsweijer Date: Tue, 28 May 2024 10:02:47 +0200 Subject: [PATCH] bugfix --- CMakeLists.txt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e07c596b..839d3bb83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,19 +18,17 @@ message(STATUS "p4est ${PROJECT_VERSION} " # --- external libs -# Option to use an already installed SC library. -if ( P4EST_USE_SYSTEM_SC ) - find_package( SC REQUIRED PATHS /path/to/system/sc ) -else() - add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/sc ) -endif() - # Skip `libsc` if already registered. This is useful when `p4est` is added as a # dependency by another software project which in turn already registered `libsc`. if(NOT TARGET SC::SC) - include(cmake/GitSubmodule.cmake) - git_submodule("${PROJECT_SOURCE_DIR}/sc") - add_subdirectory(sc) + # Option to use an already installed SC library. + if ( P4EST_USE_SYSTEM_SC ) + find_package( SC REQUIRED PATHS /path/to/system/sc ) + else() + include(cmake/GitSubmodule.cmake) + git_submodule("${PROJECT_SOURCE_DIR}/sc") + add_subdirectory(sc) + endif() endif() # --- configure p4est