Commit 0ebbbbf2 authored by Shervin Nourbakhsh's avatar Shervin Nourbakhsh
Browse files

Bug fixes for c++ api:

 - FindZeroMQ now shipped in the installation path of the cmake config
 - fixed library name in the exported cameo-api-cpp-config.cmake
 - set shared library as default when building and installing
parent 597eaa7e
......@@ -19,6 +19,7 @@ set(component_runtime CAMEO_API_CPP_RUNTIME)
set(component_development CAMEO_API_CPP_DEVELOPMENT)
#--------------- Options
option(CAMEO_API_CPP_TESTS "Compiling the test programs" OFF)
option(BUILD_SHARED_LIBS "Compiling shared or static library version of the api" ON)
if(NOT DEFINED ${CMAKE_BUILD_TYPE})
set(CMAKE_BUILD_TYPE "Release") # set Release by default
......@@ -144,7 +145,7 @@ install(TARGETS ${LIBNAME}
PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDEDIR}
COMPONENT ${component_development}
INCLUDES DESTINATION ${INSTALL_INCLUDEDIR}
COMPONENT ${component_development}
# COMPONENT ${component_development}
)
# this is to install the headers
......@@ -198,6 +199,12 @@ install(
# Put config file in per-project dir (name MUST match), can also
# just go into 'cmake'.
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/FindZeroMQ.cmake
DESTINATION ${ConfigPackageLocation}
COMPONENT ${component_development}
)
if(UNIX)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz
......
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
find_dependency(ZeroMQ)
find_dependency (Threads)
if(NOT TARGET ${NAMESPACE}::${LIBNAME})
include(${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}-targets.cmake)
if(NOT TARGET @NAMESPACE@::@LIBNAME@)
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake)
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment