Skip to content
Snippets Groups Projects

Use target definitions generated by cmake

Merged Reiner Hauser requested to merge rhauser/CrestApi:native-target into release-5.0-CR1
2 files
+ 14
20
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 3
3
@@ -85,10 +85,10 @@ add_library(CrestApiLib SHARED ${SOURCES} ${HEADERS})
target_link_libraries(CrestApiLib ${CURL_LIBRARIES} ${Boost_LIBRARIES} nlohmann_json::nlohmann_json)
target_include_directories(CrestApiLib PUBLIC
$<BUILD_INTERFACE:${headers_path}> # for headers when building
$<INSTALL_INTERFACE:${include_dest}> # for client in install mode
$<INSTALL_INTERFACE:include> # for client in install mode
)
install(TARGETS CrestApiLib EXPORT CrestApiLib DESTINATION lib)
install(EXPORT CrestApiLib DESTINATION lib)
install(TARGETS CrestApiLib EXPORT CrestApiLib DESTINATION lib/cmake/CrestApiLib)
install(EXPORT CrestApiLib NAMESPACE CrestApiLib:: DESTINATION lib/cmake/CrestApiLib)
add_executable(crest_example_server ${SOURCES_EXAMPLE_SRV} ${HEADERS})
target_link_libraries(crest_example_server CrestApiLib stdc++)
Loading