diff --git a/CMakeLists.txt b/CMakeLists.txt index e5aec70b..5860d1a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required (VERSION 3.12) ######### cmake_policy( SET CMP0048 NEW ) # version in project() -project( Dripline VERSION 2.8.7 ) +project( Dripline VERSION 2.8.8 ) list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/scarab/cmake ) @@ -55,6 +55,15 @@ add_definitions( -DDL_MAX_PAYLOAD_SIZE=${Dripline_MAX_PAYLOAD_SIZE} ) set( PUBLIC_EXT_LIBS ) set( PRIVATE_EXT_LIBS ) +# Pybind11 +if( Dripline_BUILD_PYTHON ) + find_package( Python3 REQUIRED COMPONENTS Interpreter Development ) + set(PYBIND11_PYTHON_VERSION ${Python3_VERSION} CACHE STRING "") + find_package( pybind11 REQUIRED ) + include_directories( ${Python3_INCLUDE_DIRS} ) + list( APPEND PUBLIC_EXT_LIBS pybind11::module pybind11::embed ) +endif( Dripline_BUILD_PYTHON ) + # Threads are required by: test_scheduler if( Dripline_ENABLE_TESTING ) find_package( Threads REQUIRED ) @@ -189,6 +198,7 @@ endif() # Package Config # ################## -configure_file( ${PROJECT_SOURCE_DIR}/DriplineConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/DriplineConfig.cmake @ONLY ) - -pbuilder_do_package_config() +pbuilder_do_package_config( + INPUT_FILE ${PROJECT_SOURCE_DIR}/DriplineConfig.cmake.in + OUTPUT_FILE DriplineConfig.cmake +) diff --git a/Dockerfile b/Dockerfile index ee5419a5..11a923e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ ARG img_repo=python -ARG img_tag=3.8-buster +ARG img_tag=3.12.1-slim-bookworm -FROM ${img_repo}:${img_tag} +# This FROM line includes a label so that the dependencies can be built by themselves by using the `--target` argument of `docker build` +FROM ${img_repo}:${img_tag} as base ARG build_type=Release ARG build_examples=FALSE @@ -15,20 +16,20 @@ RUN apt-get update && \ apt-get --fix-missing -y install \ build-essential \ cmake \ - gdb \ +# gdb \ git \ libboost-chrono-dev \ libboost-filesystem-dev \ libboost-system-dev \ librabbitmq-dev \ libyaml-cpp-dev \ - rapidjson-dev \ + rapidjson-dev && \ # pybind11-dev \ - wget && \ +# wget && \ rm -rf /var/lib/apt/lists/* # use pybind11_checkout to specify a tag or branch name to checkout -ARG pybind11_checkout=v2.6.2 +ARG pybind11_checkout=v2.11.1 RUN cd /usr/local && \ git clone https://github.com/pybind/pybind11.git && \ cd pybind11 && \ @@ -36,8 +37,11 @@ RUN cd /usr/local && \ mkdir build && \ cd build && \ cmake -DPYBIND11_TEST=FALSE .. && \ - make -j3 install + make -j3 install && \ + cd / && \ + rm -rf /usr/local/pybind11 +FROM base # note that the build dir is *not* in source, this is so that the source can me mounted onto the container without covering the build target diff --git a/DriplineConfig.cmake.in b/DriplineConfig.cmake.in index e4a39500..4defc0f3 100644 --- a/DriplineConfig.cmake.in +++ b/DriplineConfig.cmake.in @@ -1,5 +1,7 @@ # DriplineConfig.cmake +@PACKAGE_INIT@ + get_filename_component( Dripline_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH ) include( CMakeFindDependencyMacro ) @@ -13,3 +15,5 @@ if( NOT TARGET Dripline::@Dripline_FULL_TARGET_NAME@ ) include("${Dripline_CMAKE_DIR}/Dripline_Library_Targets.cmake") endif() endif() + +check_required_components( Dripline ) diff --git a/executables/CMakeLists.txt b/executables/CMakeLists.txt index f9b402a2..1bbc8be0 100644 --- a/executables/CMakeLists.txt +++ b/executables/CMakeLists.txt @@ -26,4 +26,5 @@ pbuilder_executables( pbuilder_component_install_and_export( COMPONENT Executables EXETARGETS ${dripline_exe_PROGRAMS} + NAMESPACE Dripline:: ) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 7926f966..6cd4366b 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -95,6 +95,7 @@ pbuilder_library( pbuilder_component_install_and_export( COMPONENT Library LIBTARGETS Dripline + NAMESPACE Dripline:: ) pbuilder_install_headers( ${dripline_HEADERS} ) diff --git a/scarab b/scarab index ed2e68f1..aa177cc0 160000 --- a/scarab +++ b/scarab @@ -1 +1 @@ -Subproject commit ed2e68f1f9b36ea343801b674c0bb1139af4a99d +Subproject commit aa177cc0506431891cc0550999901837adb36d4d