forked from cpp-best-practices/cmake_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modernize the cmake build concept too: * Import your installed targets with an test to be sure it is usable. * Add support for PROJECT_IS_TOP_LEVEL cmake variable * Enable conan again as default
- Loading branch information
1 parent
f37c1ab
commit e51378d
Showing
4 changed files
with
61 additions
and
28 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 |
---|---|---|
@@ -1,16 +1,12 @@ | ||
find_package(fmt CONFIG) | ||
find_package(spdlog CONFIG) | ||
find_package(docopt CONFIG) | ||
find_package(fmt CONFIG REQUIRED) | ||
find_package(spdlog CONFIG REQUIRED) | ||
find_package(docopt CONFIG REQUIRED) | ||
|
||
# Generic test that uses conan libs | ||
add_executable(intro main.cpp) | ||
target_link_libraries( | ||
intro | ||
PRIVATE project_options | ||
project_warnings | ||
docopt::docopt | ||
fmt::fmt | ||
spdlog::spdlog) | ||
PUBLIC project_options project_warnings | ||
PRIVATE docopt::docopt fmt::fmt spdlog::spdlog) | ||
|
||
target_include_directories(intro PRIVATE "${CMAKE_BINARY_DIR}/configured_files/include") | ||
|
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