-
-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CrowConfig.cmake and related files
This patch allows downstream projects to use Crow simply by including the following lines in their CMakeLists.txt: find_package(Crow CONFIG REQUIRED) target_link_libraries(myProject Crow::crow) All transitive dependencies for the project are then managed internally, not requiring downstream projects to change their source when upgrading to newer versions of Crow.
- Loading branch information
1 parent
fc27f73
commit b35041e
Showing
2 changed files
with
39 additions
and
1 deletion.
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,19 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
find_dependency(Threads) | ||
find_dependency(ZLIB) | ||
if (MSVC) | ||
set(Boost_USE_STATIC_LIBS ON) | ||
find_dependency(Boost 1.64.0 COMPONENTS system thread regex) | ||
else() | ||
find_dependency(Boost 1.64.0 COMPONENTS system thread) | ||
endif() | ||
|
||
find_dependency(OpenSSL) | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/CrowConfigTargets.cmake") | ||
check_required_components("@PROJECT_NAME@") | ||
set(@PROJECT_NAME@_LIBRARIES ZLIB::ZLIB ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} ${OpenSSL_LIBRARIES}) | ||
set_target_properties(Crow::crow PROPERTIES | ||
INTERFACE_LINK_LIBRARIES "${@PROJECT_NAME@_LIBRARIES}") |