Skip to content

Commit

Permalink
Fix Sylvan cannot be compiled as a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
SSoelvsten authored and trolando committed Mar 23, 2024
1 parent f4da769 commit 9ccb1fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ FetchContent_MakeAvailable(lace)
# Add the Sylvan library target
add_subdirectory(src)

if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
# If we are in the root, add some options to build examples/tests
option(SYLVAN_BUILD_EXAMPLES "Build example tools" ON)
option(SYLVAN_BUILD_DOCS "Build documentation" OFF)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ install(EXPORT sylvan-targets
include(CMakePackageConfigHelpers)

configure_package_config_file(
${CMAKE_SOURCE_DIR}/cmake/sylvan-config.cmake.in
${PROJECT_SOURCE_DIR}/cmake/sylvan-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/sylvan-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/sylvan
)
Expand Down

0 comments on commit 9ccb1fd

Please sign in to comment.