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) ...@@ -19,6 +19,7 @@ set(component_runtime CAMEO_API_CPP_RUNTIME)
set(component_development CAMEO_API_CPP_DEVELOPMENT) set(component_development CAMEO_API_CPP_DEVELOPMENT)
#--------------- Options #--------------- Options
option(CAMEO_API_CPP_TESTS "Compiling the test programs" OFF) 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}) if(NOT DEFINED ${CMAKE_BUILD_TYPE})
set(CMAKE_BUILD_TYPE "Release") # set Release by default set(CMAKE_BUILD_TYPE "Release") # set Release by default
...@@ -144,7 +145,7 @@ install(TARGETS ${LIBNAME} ...@@ -144,7 +145,7 @@ install(TARGETS ${LIBNAME}
PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDEDIR} PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDEDIR}
COMPONENT ${component_development} COMPONENT ${component_development}
INCLUDES DESTINATION ${INSTALL_INCLUDEDIR} INCLUDES DESTINATION ${INSTALL_INCLUDEDIR}
COMPONENT ${component_development} # COMPONENT ${component_development}
) )
# this is to install the headers # this is to install the headers
...@@ -198,6 +199,12 @@ install( ...@@ -198,6 +199,12 @@ install(
# Put config file in per-project dir (name MUST match), can also # Put config file in per-project dir (name MUST match), can also
# just go into 'cmake'. # just go into 'cmake'.
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/FindZeroMQ.cmake
DESTINATION ${ConfigPackageLocation}
COMPONENT ${component_development}
)
if(UNIX) if(UNIX)
add_custom_command( add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz
......
@PACKAGE_INIT@ @PACKAGE_INIT@
include(CMakeFindDependencyMacro) include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
find_dependency(ZeroMQ) find_dependency(ZeroMQ)
find_dependency (Threads) find_dependency (Threads)
if(NOT TARGET ${NAMESPACE}::${LIBNAME}) if(NOT TARGET @NAMESPACE@::@LIBNAME@)
include(${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}-targets.cmake) include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake)
endif() 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