forked fromglynos/cpp-netlib
- Notifications
You must be signed in to change notification settings - Fork425
provide cppnetlibConfig.cmake file#303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
add CMake package configuration file
This will enabled other CMake-based projects to find an installed versionof cpp-netlib via find_package(cppnetlib [[VERSION] 0.10.1] [REQUIRED])To link to the installed cppnetlib version projects want to use include_directories(${CPPNETLIB_INCLUDE_DIRS}) target_link_library(myTarget ${CPPNETLIB_LIBRARIES})- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commita627916d4a11f50fc26f292f089deff2014aa7fa
There are no files selected for viewing
55 changes: 53 additions & 2 deletionsCMakeLists.txt
This file contains hidden or 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
24 changes: 24 additions & 0 deletionscppnetlibConfig.cmake.in
This file contains hidden or 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,24 @@ | ||
| # - Config file for the cppnetlib package | ||
| # It defines the following variables | ||
| # CPPNETLIB_INCLUDE_DIRS - include directories for cppnetlib | ||
| # CPPNETLIB_LIBRARIES - libraries to link against | ||
| # CPPNETLIB_EXECUTABLE - the bar executable | ||
| # Compute paths | ||
| get_filename_component(CPPNETLIB_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
| set(CPPNETLIB_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") | ||
| # Our library dependencies (contains definitions for IMPORTED targets) | ||
| if( NOT TARGET cppnetlib-client-connections | ||
| AND NOT TARGET cppnetlib-server-parsers | ||
| AND NOT TARGET cppnetlib-uri | ||
| AND NOT CPPNETLIB_BINARY_DIR) | ||
| include("${CPPNETLIB_CMAKE_DIR}/cppnetlibTargets.cmake") | ||
| endif() | ||
| # These are IMPORTED targets created by cppnetlibTargets.cmake | ||
| set(CPPNETLIB_LIBRARIES | ||
| cppnetlib-client-connections | ||
| cppnetlib-server-parsers | ||
| cppnetlib-uri) | ||
| #set(CPPNETLIB_EXECUTABLE ...) # maybe the examples? |
11 changes: 11 additions & 0 deletionscppnetlibConfigVersion.cmake.in
This file contains hidden or 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,11 @@ | ||
| set(PACKAGE_VERSION "@CPPNETLIB_VERSION_STRING@") | ||
| # Check whether the requested PACKAGE_FIND_VERSION is compatible | ||
| if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") | ||
| set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
| else() | ||
| set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
| if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") | ||
| set(PACKAGE_VERSION_EXACT TRUE) | ||
| endif() | ||
| endif() |
30 changes: 24 additions & 6 deletionslibs/network/src/CMakeLists.txt
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.