Software Architecture with C++ by Adrian Ostrowski & Piotr Gaczkowski

Software Architecture with C++ by Adrian Ostrowski & Piotr Gaczkowski

Author:Adrian Ostrowski & Piotr Gaczkowski [Adrian Ostrowski]
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2021-04-15T16:00:00+00:00


find_package(customer CONFIG REQUIRED)

add_executable(example example.cpp)

target_link_libraries(example customer::customer)

# CTest tests can be added here

Simple as that. We link to all the Conan libraries provided (in our case, just our Customer library).

Finally, let's write our example.cpp file with just enough logic to check whether the package was successfully created:

#include <customer/customer.h>

int main() { responder{}.prepare_response("Conan"); }

Before we start running all this, there are a few small changes that we need to make in our main tree of CMake lists. Let's now see how to export Conan targets from our CMake file properly.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.