-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cmake config): add a modern CMake Find
- Loading branch information
1 parent
c92aa73
commit 424b057
Showing
3 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
set_and_check(SFCGAL_INCLUDE_DIR "@PACKAGE_SFCGAL_INCLUDE_DIR@") | ||
set_and_check(SFCGAL_LIBRARY_DIR "@PACKAGE_SFCGAL_LIBRARY_DIR@") | ||
|
||
if(NOT TARGET SFCGAL::SFCGAL) | ||
add_library(SFCGAL::SFCGAL SHARED IMPORTED) | ||
set_target_properties(SFCGAL::SFCGAL PROPERTIES | ||
IMPORTED_LOCATION "${SFCGAL_LIBRARY_DIR}/libSFCGAL.so" | ||
INTERFACE_INCLUDE_DIRECTORIES "${SFCGAL_INCLUDE_DIR}" | ||
) | ||
endif() | ||
|
||
check_required_components(SFCGAL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set(PACKAGE_VERSION "@SFCGAL_VERSION@") | ||
|
||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) | ||
set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
else() | ||
set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) | ||
set(PACKAGE_VERSION_EXACT TRUE) | ||
endif() | ||
endif() |