Commit 1d481686 authored by legoc's avatar legoc
Browse files

Merged release 1.1.1 into v1

parents 607ea042 d5a8d990
/target/
/bin/
/.settings/
build/
/build-deb/
cmake_minimum_required(VERSION 3.12.0)
project(cameo
VERSION 1.1.1
LANGUAGES C
HOMEPAGE_URL "https://code.ill.fr/cameo/cameo"
)
option(CAMEO_API_CPP "Compile and install cameo C++ api" OFF)
option(CAMEO_API_PYTHON "Compile and install cameo Python api" OFF)
if(NOT DEFINED ${CMAKE_BUILD_TYPE})
set(CMAKE_BUILD_TYPE "Release") # set Release by default
endif()
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
if(${CAMEO_API_CPP})
list(APPEND APIs cameo-api-cpp)
endif()
if(${CAMEO_API_PYTHON})
list(APPEND APIs cameo-api-cpp)
mark_as_advanced(CAMEO_API_CPP)
list(APPEND APIs cameo-api-python)
endif()
list(REMOVE_DUPLICATES APIs)
#------------------------------------------------------------
# This is a trick: for the subprojects metioned here,
# the find_package does nothing, since the targets will be defined
# by the add_subdirectory command
set(as_subproject cameo-api-cpp-static)
macro(find_package)
if(NOT "${ARGV0}" IN_LIST as_subproject)
_find_package(${ARGV})
endif()
endmacro()
#dependencies
#foreach(package cameo-com-jzmq )
# add_subdirectory(cameo-com/${package})
#endforeach()
foreach(package cameo-server-jzmq cameo-console-jzmq
${APIs})
add_subdirectory(${package})
endforeach()
# common CPack configuration
#include(${CMAKE_SOURCE_DIR}/CPackConfigCommon.in)
#set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/packaging/CPackConfig.cmake)
#include(CPack)
......@@ -25,6 +25,7 @@ git log --graph main_master cpp_master
# we have to rewrite the history in the C++ API branch and rebase w.r.t. the main
git rebase -i main_master cpp_master
git checkout master
git subtree merge -P cameo-api-cpp/ cpp_master
# you need to solve few conflicts :-)
......
#set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/CPackConfig.in)
#set (CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set (CPACK_PACKAGE_CONTACT "Yannick Le Goc <legoc@ill.fr>")
set(CPACK_GENERATOR "DEB")
#set(CPACK_PACKAGE_DESCRIPTION_FILE "/home/andy/vtk/CMake/Copyright.txt")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Description summary ")
set(CPACK_PACKAGE_DESCRIPTION "Long description")
set(CPACK_PACKAGE_VENDOR "ILL")
#set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
set (CPACK_RPM_BUILDREQUIRES "cmake >= ${CMAKE_MINIMUM_REQUIRED_VERSION}")
set (CPACK_DEBIAN_PACKAGE_SECTION lib)
set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
set (CPACK_RPM_PACKAGE_LICENSE "EUPL v1.1")
#set (CPACK_COMPONENTS_IGNORE_GROUPS ON)
unset (CPACK_MONOLITHIC_INSTALL)
set (CPACK_DEB_COMPONENT_INSTALL TRUE)
set(CPACK_RPM_COMPONENT_INSTALL TRUE)
set (CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
# Compile and Install
## Dependencies
- maven
- java (>=9)
### Centos 8
``` yum install -y maven java-latest-openjdk-devel ```
Update to the most recent version of JAVA
``` sudo /sbin/alternatives --config java_sdk_openjdk ```
### Ubuntu
``` sudo apt install maven```
## Instructions
Download the version:
```
git clone -b v1.1 --depth 1 https://code.ill.fr/cameo/cameo.git
```
### Option1: maven+cmake
Compile:
```
cd cameo/
cmake -S . -B build/ -D<OPTION>
cmake --build build/
```
Possible options are:
- CMAKE_INSTALL_PREFIX=<your_chosen_install_basepath>: to install in a non-standard directory
- CAMEO_API_CPP=ON: to build and install the C++ API
- CAMEO_API_PYTHON=ON: to build and install the Python API
Install:
```
sudo cmake --build . --target install
```
### Option2: cmake + cpack = DEB package
It is also possible to build and create Debian packages. In this case, please use the build_and_package.sh script.
```
./build_and_package.sh <build_directory>
```
The script provides the following .deb packages located in <build_directory>/packages/
They can be installed using package manager.
Please go to the [Wiki](https://code.ill.fr/cameo/cameo-commons/wikis/home).
# Dependencies
## Centos
# Running Dependencies
## Centos 8
- YUM EPEL8 repository
- JAVA 9
```
yum install -y --enablerepo=epel java-latest-openjdk-devel java-latest-openjdk-headless java-latest-openjdk
```
## Ubuntu bionic
## Debian
Instructions about compilation and installation can be found in [INSTALL.md](INSTALL.md)
# cameo-api-cpp
- Fix symbol visibility with macros exported by CMake
#!/bin/bash
BASE_BUILD_DIR=${1:-/dev/shm/cameo/}
[ "$BASE_BUILD_DIR" != "${BASE_BUILD_DIR#/}" ] || BASE_BUILD_DIR=$PWD/$BASE_BUILD_DIR
packages_dir=${BASE_BUILD_DIR}/packages
mkdir ${packages_dir} -p
#mvn install
function mvPack(){
mv ${build_dir}/packaging/*.deb ${packages_dir}/
}
#--------------- JAVA
for source_dir in cameo-server-jzmq cameo-console-jzmq
do
echo "COMPONENT: $source_dir"
build_dir=$BASE_BUILD_DIR/$source_dir
cmake -S $source_dir -B $build_dir/ || exit 1
cmake --build $build_dir || exit 1
cpack --config $build_dir/CPackConfig.cmake -B $build_dir/packaging/ || exit 2
mvPack
done
#--------------- API
#---------- C++
build_dir=$BASE_BUILD_DIR/cameo-api-cpp/
cmake -S cameo-api-cpp -B $build_dir -DCMAKE_INSTALL_PREFIX=/usr/ # with this it adds x86_64-linux-gnu to the path when running cpack
cmake --build $build_dir
cpack --config $build_dir/CPackConfig.cmake -B $build_dir/packaging
mvPack
#---------- Python
build_dir=$BASE_BUILD_DIR/cameo-api-python/
cmake -S cameo-api-python -B $build_dir -DCMAKE_PREFIX_PATH=$BASE_BUILD_DIR/cameo-api-cpp/ || exit 1
cmake --build $build_dir || exit 1
cpack --config $build_dir/CPackConfig.cmake -B $build_dir/packaging/ || exit 1
mvPack
BasedOnStyle: LLVM
IndentWidth: 8
UseTab: ForIndentation
BreakBeforeBraces: Linux
#UseTab: UT_AlignWithSpaces # available in release later than 9
UseTab: ForContinuationAndIndentation
BreakBeforeBraces: Custom
BraceWrapping:
AfterNamespace: false
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
ColumnLimit: 110
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AccessModifierOffset: 0
NamespaceIndentation: Inner
\ No newline at end of file
AlignConsecutiveDeclarations: false
AlignTrailingComments: true
AccessModifierOffset: -8 # It has to be equal to the tab size
NamespaceIndentation: None
PointerAlignment: Left
AlwaysBreakAfterReturnType: None
SortIncludes: false
......@@ -7,3 +7,4 @@
/Makefile.in
/.settings/
/Debug/
build/
\ No newline at end of file
if(NOT DEFINED PROJECT_NAME)
cmake_minimum_required(VERSION 3.7.2)
# Project name and version
project(cameo VERSION 1.0.2 LANGUAGES CXX)
endif()
cmake_minimum_required(VERSION 3.12.0)
project(cameo-api-cpp
VERSION 1.1.1
LANGUAGES CXX
HOMEPAGE_URL "https://code.ill.fr/cameo/cameo"
)
#--------------- Helpers
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
include(FetchContent)
if(NOT DEFINED BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS True)
endif()
# name of the target library
set(LIBNAME ${PROJECT_NAME})
set(NAMESPACE Cameo)
set(INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/cameo/api)
set(ConfigPackageLocation ${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME})
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_CXX_STANDARD)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
if(NOT DEFINED ${CMAKE_BUILD_TYPE})
set(CMAKE_BUILD_TYPE "Release") # set Release by default
endif()
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
# fix the RPATH for the linker
#if(not APPLE)
# set(CMAKE_INSTALL_RPATH $ORIGIN)
#endif()
if(NOT APPLE)
set(CMAKE_INSTALL_RPATH $ORIGIN)
endif()
#------------------------------------------------------------
# Dependencies
#------------------------------------------------------------
# this is needed when including this file as subdir
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
find_package(ZeroMQ REQUIRED)
find_package(Rapidjson REQUIRED)
find_package (Threads REQUIRED)
find_package(Rapidjson 1.1.0 QUIET)
if(NOT Rapidjson_FOUND)
message(WARNING "Using Rapidjson from GIT repository")
FetchContent_Declare(rapidjson
GIT_REPOSITORY https://github.com/Tencent/rapidjson.git
GIT_TAG v1.1.0
GIT_SHALLOW True
)
FetchContent_GetProperties(rapidjson)
FetchContent_Populate(rapidjson)
set(Rapidjson_ROOT ${rapidjson_SOURCE_DIR})
find_package(Rapidjson REQUIRED)
endif()
message(STATUS "Rapidjson found here: ${Rapidjson_INCLUDE_DIRS}")
#------------------------------------------------------------
#------------------------------------------------------------
# Libraries
#------------------------------------------------------------
#---------------
# Files
file(GLOB_RECURSE CAMEO_SOURCE_FILES "src/*.cpp")
#file(GLOB CAMEO_PUBLIC_HEADER_FILES "./*.h")
#message(${CAMEO_PUBLIC_HEADER_FILES})
#message(${CAMEO_SOURCE_FILES})
add_library(cameo ${CAMEO_SOURCE_FILES})
target_link_libraries(cameo PRIVATE zmq)
target_include_directories(cameo
file(GLOB_RECURSE CAMEO_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
configure_file(include/cameo.h.in ${INSTALL_INCLUDEDIR}/cameo.h )
add_library(${LIBNAME}-obj OBJECT ${CAMEO_SOURCE_FILES})
target_link_libraries(${LIBNAME}-obj PUBLIC zmq Threads::Threads) # for some reason this is not propagated to ${LIBNAME}
target_include_directories(${LIBNAME}-obj
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/ # all the private headers
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include> # here's the version
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_include_directories(${LIBNAME}-obj
SYSTEM PRIVATE ${Rapidjson_INCLUDE_DIRS}/
)
target_compile_features(${LIBNAME}-obj PUBLIC cxx_std_17)
set_target_properties(cameo PROPERTIES
set_target_properties(${LIBNAME}-obj PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION}
POSITION_INDEPENDENT_CODE 1 # this is needed for static compilation for cameo-api-python
)
message(${PROJECT_VERSION_MAJOR})
message(${PROJECT_VERSION})
#---------------
# Library version
write_basic_package_version_file(cameoConfigVersion.cmake
COMPATIBILITY SameMajorVersion
add_library(${LIBNAME}-static STATIC $<TARGET_OBJECTS:${LIBNAME}-obj>)
add_library(${LIBNAME} $<TARGET_OBJECTS:${LIBNAME}-obj>)
add_library(${NAMESPACE}::${LIBNAME} ALIAS ${LIBNAME})
add_library(${NAMESPACE}::${LIBNAME}-obj ALIAS ${LIBNAME}-obj)
add_library(${NAMESPACE}::${LIBNAME}-static ALIAS ${LIBNAME}-static)
target_include_directories(${LIBNAME}
SYSTEM PRIVATE ${Rapidjson_INCLUDE_DIRS}/
)
get_target_property(obj_INTERFACE_LINK_LIBRARIES ${LIBNAME}-obj INTERFACE_LINK_LIBRARIES)
get_target_property(obj_INTERFACE_COMPILE_FEATURES ${LIBNAME}-obj INTERFACE_COMPILE_FEATURES)
get_target_property(obj_INTERFACE_INCLUDE_DIRECTORIES ${LIBNAME}-obj INTERFACE_INCLUDE_DIRECTORIES)
set_target_properties(${LIBNAME} PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION}
POSITION_INDEPENDENT_CODE 1 # this is needed for static compilation for cameo-api-python
INTERFACE_LINK_LIBRARIES "${obj_INTERFACE_LINK_LIBRARIES}"
INTERFACE_COMPILE_FEATURES ${obj_INTERFACE_COMPILE_FEATURES}
INTERFACE_INCLUDE_DIRECTORIES "${obj_INTERFACE_INCLUDE_DIRECTORIES}"
)
set_target_properties(${LIBNAME}-static PROPERTIES
INTERFACE_LINK_LIBRARIES "${obj_INTERFACE_LINK_LIBRARIES}"
INTERFACE_COMPILE_FEATURES "${obj_INTERFACE_COMPILE_FEATURES}"
INTERFACE_INCLUDE_DIRECTORIES "${obj_INTERFACE_INCLUDE_DIRECTORIES}"
)
#------------------------------------------------------------
# Tests
#------------------------------------------------------------
# Note: execute ctest --verbose to have more details
enable_testing()
add_subdirectory(tests)
include(GenerateExportHeader)
generate_export_header(${LIBNAME}
EXPORT_MACRO_NAME ${LIBNAME}_EXPORT
EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/${INSTALL_INCLUDEDIR}/export.h
)
#------------------------------------------------------------
# Install
#------------------------------------------------------------
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cameoConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt
DESTINATION ${CMAKE_INSTALL_DOCDIR}/
RENAME copyright
COMPONENT ${component_runtime}
)
#---------------
# Library version
write_basic_package_version_file(${PROJECT_NAME}-config-version.cmake
COMPATIBILITY SameMajorVersion
VERSION ${PROJECT_VERSION}
)
write_basic_package_version_file(${PROJECT_NAME}-static-config-version.cmake
COMPATIBILITY SameMajorVersion
VERSION ${PROJECT_VERSION}
)
install(TARGETS ${LIBNAME}
EXPORT cameoTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # windows
COMPONENT ${component_runtime}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/ # dynamic
COMPONENT ${component_runtime}
NAMELINK_COMPONENT ${component_development} #from CMake 3.12
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/ # static
COMPONENT ${component_development}
PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDEDIR}
COMPONENT ${component_development}
# INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
# this is to install the headers
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ # don't forget the trailing /
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
DESTINATION ${INSTALL_INCLUDEDIR}
COMPONENT ${component_development}
FILES_MATCHING PATTERN *.h
)
# this is to install the version header that is generated by cmake
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ # don't forget the trailing /
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT ${component_development}
FILES_MATCHING PATTERN *.h
)
# in CMake 3.14 you just need #install(TARGETS cameo)
install(TARGETS cameo
EXPORT cameoexport
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # windows
COMPONENT cameo_Runtime
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # dynamic
COMPONENT cameo_Runtime
# NAMELINK_COMPONENT cameo_Development #from CMake 3.12
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # static
COMPONENT cameo_Development
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
# this is for cameo-api-python to compile from the local build tree
export(TARGETS ${LIBNAME}-static
NAMESPACE ${NAMESPACE}::
FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-static-targets.cmake
)
export(EXPORT cameoTargets
# FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-${type}-targets.cmake
FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-targets.cmake
NAMESPACE ${NAMESPACE}::
)
configure_package_config_file(cmake/${PROJECT_NAME}-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION ${ConfigPackageLocation}
)
configure_file(cmake/${PROJECT_NAME}-static-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-static-config.cmake
COPYONLY
)
install(EXPORT cameoTargets
FILE ${PROJECT_NAME}-targets.cmake
# FILE ${PROJECT_NAME}Config.cmake #${PROJECT_NAME}Targets.cmake
NAMESPACE ${NAMESPACE}::
DESTINATION ${ConfigPackageLocation}
COMPONENT ${component_development}
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
${CMAKE_CURRENT_SOURCE_DIR}/FindZeroMQ.cmake
DESTINATION ${ConfigPackageLocation}
COMPONENT ${component_development}
)
# This makes the project importable from the install directory
# Put config file in per-project dir (name MUST match), can also
# just go into 'cmake'.
install(EXPORT cameoexport
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
FILE ${PROJECT_NAME}Config.cmake
)
# makes the project importable from the build directory
export(TARGETS cameo FILE ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake)
# the install_manifest file is created only after the installation....
#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
# RENAME cameo_install_manifest.txt
# )
#enable_testing()
#add_subdirectory(test)
if(UNIX)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz
COMMAND gzip -cn9 ${CMAKE_CURRENT_SOURCE_DIR}/ChangeLog ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/changelog"
COMMENT "Compressing changelog"
)
add_custom_target(changelog
ALL
# DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz
COMMAND gzip -cn9 ${CMAKE_CURRENT_SOURCE_DIR}/ChangeLog > ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz"
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
COMPONENT ${component_runtime}
)
endif(UNIX)
#include(CMakeFindDependencyMacro)
#find_dependency(
#include("${CMAKE_CURRENT_LIST_DIR}/cameo.cmake")
################ Doc
find_package(Doxygen)
#------------------------------------------------------------
# Doc
#------------------------------------------------------------
find_package(Doxygen QUIET)
if (DOXYGEN_FOUND)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
......@@ -135,7 +244,7 @@ if (DOXYGEN_FOUND)
message("Doxygen build started")
# note the option ALL which allows to build the docs together with the application
add_custom_target( doc
add_custom_target( cameo_doc
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
......@@ -144,4 +253,17 @@ else (DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
#------------------------------------------------------------
# CPack
#------------------------------------------------------------
include(${CMAKE_CURRENT_SOURCE_DIR}/packaging/CPackConfig.cmake)
include(CPack)
#------------------------------------------------------------
# Tests
#------------------------------------------------------------
if(CAMEO_API_CPP_TESTS)
# Note: execute ctest --verbose to have more details
enable_testing()
add_subdirectory(tests)
endif(CAMEO_API_CPP_TESTS)
## Development
How to find the list of public headers and check that they are all in the include/ directory
1. move all the headers in src/
2. move cameo.h to include/
3. run the following command multiple times until there is no output
```
#!/bin/fish
set -l ORIG_DIR src
for f in (for file in include/*; grep include $file | grep '"'; end | sort | uniq | sed 's|.* "||;s|"||'); if [ -e $ORIG_DIR/$f ] ; echo $f; git mv $ORIG_DIR/$f include/; end; end
```
set(CPACK_PACKAGE_NAME cameo)
set (CPACK_PACKAGE_CHECKSUM MD5)
set (CPACK_COMPONENT_DEV_REQUIRED ON)
set (CPACK_COMPONENT_LIB_REQUIRED ON)
set (CPACK_COMPONENT_DEV_DEPENDS LIB )
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )
set (CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON )
set (CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=" )
#set (CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
#set (DEBIAN_PACKAGE_BUILDS_DEPENDS "gcc (>=8), gcc-c++ (>=8), cmake (>=${CMAKE_MINIMUM_REQUIRED_VERSION})" )
set (CPACK_DEBIAN_LIB_PACKAGE_DEPENDS "cameo-server(>=1.0.2)" )
set(CPACK_DEBIAN_DEV_PACKAGE_NAME ${LIBNAME}-dev)
set(CPACK_DEBIAN_DEV_PACKAGE_NAME ${LIBNAME}-dev )
set(CPACK_DEBIAN_LIB_PACKAGE_NAME ${LIBNAME}-lib)
set(CPACK_DEBIAN_LIB_PACKAGE_NAME ${LIBNAME}-lib )
set(CPACK_DEBIAN_DEV_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_DEBIAN_DEV_FILE_NAME ${CPACK_DEBIAN_DEV_PACKAGE_NAME}_${PROJECT_VERSION}_${CPACK_DEBIAN_DEV_PACKAGE_ARCHITECTURE}.deb )
set(CPACK_DEBIAN_LIB_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_DEBIAN_LIB_FILE_NAME ${CPACK_DEBIAN_LIB_PACKAGE_NAME}_${PROJECT_VERSION}_${CPACK_DEBIAN_LIB_PACKAGE_ARCHITECTURE}.deb )
#if((${CMAKE_BUILD_TYPE} EQUAL "Debug") OR (${CMAKE_BUILD_TYPE} EQUAL "RelWithDebInfo"))
# set (CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
# set (CPACK_RPM_DEBUGINFO_PACKAGE ON)
#endif()
####### CPACK RPM
#message("CPACK SYSTEM NAME: ${CMAKE_SYSTEM_NAME}")
# cpack_add_component(lib