Skip to content

Commit

Permalink
Merge pull request #306 from sandro-elsweijer/feature-cmake-use-syste…
Browse files Browse the repository at this point in the history
…m-sc

CMake option to use a system installed sc
  • Loading branch information
cburstedde authored Jul 15, 2024
2 parents d9ec972 + 5c9bf54 commit 8206f0e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ message(STATUS "p4est ${PROJECT_VERSION} "
# 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 )
else()
include(cmake/GitSubmodule.cmake)
git_submodule("${PROJECT_SOURCE_DIR}/sc")
add_subdirectory(sc)
endif()
endif()

# --- configure p4est
Expand Down
2 changes: 2 additions & 0 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ option(P4EST_BUILD_TESTING "build p4est testing" on)

option(enable-file-deprecated "use deprecated data file format" off)

option( P4EST_USE_SYSTEM_SC "Use system-installed sc library" OFF )

option(vtk_binary "VTK binary interface" on)
if(vtk_binary)
set(P4EST_ENABLE_VTK_BINARY 1)
Expand Down
1 change: 1 addition & 0 deletions doc/author_elsweijer.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I place my contributions to p4est under the FreeBSD license. Sandro Elsweijer ([email protected])

0 comments on commit 8206f0e

Please sign in to comment.