From d26eacc04ad10ed8465108a2cb0e04855288ca86 Mon Sep 17 00:00:00 2001 From: Kai Wolf Date: Thu, 7 Nov 2019 15:17:06 +0100 Subject: [PATCH] Add Conan integration (#18) * Add Conan dependencies for simpleini, tclap and asio * Add Conan protobuf package from bintray * Prepare CI build scripts for using Conan * Add spdlog from bincrafters * Add HDF5 package to conanfile.txt * Add own Qt5 Conan package (needed for WinExtras) * Add proto compiler as another dependency --- .appveyor.yml | 6 ++- .gitignore | 1 + .travis.yml | 2 +- CMakeLists.txt | 49 ++++++++++--------- app/mon/eCALMon/CMakeLists.txt | 1 - .../ProtobufReflection/CMakeLists.txt | 1 - .../RawDataReflection/CMakeLists.txt | 1 - .../StringReflection/CMakeLists.txt | 1 - app/mon/eCALTopic/src/CMakeLists.txt | 2 - .../{find_scripts => Modules}/Findasio.cmake | 18 +++---- .../Findsimpleini.cmake | 19 ++++--- .../{find_scripts => Modules}/Findtclap.cmake | 19 ++++--- cmake/eCALConfig.cmake.in | 3 +- conanfile.txt | 13 +++++ contrib/ecalhdf5/src/CMakeLists.txt | 6 +-- contrib/ecalproto/src/CMakeLists.txt | 2 - ecal/pb/src/CMakeLists.txt | 1 - samples/cpp/misc/proto_dyn/src/CMakeLists.txt | 1 - .../misc/proto_dyn_json/src/CMakeLists.txt | 1 - .../multiple_rec_cb/src/CMakeLists.txt | 2 - .../multiple/multiple_snd/src/CMakeLists.txt | 2 - .../cpp/person/person_rec/src/CMakeLists.txt | 2 - .../person_rec_events/src/CMakeLists.txt | 4 +- .../cpp/person/person_snd/src/CMakeLists.txt | 2 - .../person_snd_events/src/CMakeLists.txt | 2 - .../person_snd_inproc/src/CMakeLists.txt | 2 - .../person/person_snd_lcm/src/CMakeLists.txt | 2 - .../person_snd_multicast/src/CMakeLists.txt | 2 - .../person/person_snd_rtps/src/CMakeLists.txt | 2 - .../person_snd_unicast/src/CMakeLists.txt | 2 - .../services/math_client/src/CMakeLists.txt | 2 - .../services/math_server/src/CMakeLists.txt | 2 - .../services/ping_client/src/CMakeLists.txt | 2 - .../services/ping_server/src/CMakeLists.txt | 2 - .../target_definitions/targets_protobuf.cmake | 2 +- 35 files changed, 75 insertions(+), 106 deletions(-) rename cmake/{find_scripts => Modules}/Findasio.cmake (75%) rename cmake/{find_scripts => Modules}/Findsimpleini.cmake (74%) rename cmake/{find_scripts => Modules}/Findtclap.cmake (73%) create mode 100644 conanfile.txt diff --git a/.appveyor.yml b/.appveyor.yml index 2f200deaa7..0c3f74db97 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,9 +5,13 @@ image: Visual Studio 2015 environment: QT5_ROOT_DIRECTORY: C:\Qt\5.11.3 HDF5_DIR: C:\Program Files\HDF_Group\HDF5\1.8.21\cmake + PYTHON_HOME: C:\Python37 install: + # Initialize thirdparty dependencies (remove with Conan integration) - git submodule update --init --recursive + + # Install build requirements - curl -fsS -O https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.21/bin/hdf5-1.8.21-Std-win7_64-vs14.zip - 7z x -bb0 hdf5-1.8.21-Std-win7_64-vs14.zip - msiexec /package hdf\HDF5-1.8.21-win64.msi /quiet @@ -15,7 +19,7 @@ install: - choco install cmake - choco install wixtoolset - refreshenv - + build_script: - set PATH="C:\Program Files\CMake\bin";%PATH% - build_win\win_make_all.bat diff --git a/.gitignore b/.gitignore index 3b6c9b9a44..63881a2cbc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # CMake build folders /_build* /_setup +/build* # autogenerated files /ecal/include/ecal/ecal_defs.h diff --git a/.travis.yml b/.travis.yml index 3f7d78480a..6b5206c495 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ dist: xenial language: cpp compiler: gcc - + addons: apt: sources: diff --git a/CMakeLists.txt b/CMakeLists.txt index df57c68d97..be35b3edfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,9 +5,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,10 +18,11 @@ cmake_minimum_required(VERSION 3.13) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/find_scripts) +list(APPEND CMAKE_MODULE_PATH + ${CMAKE_CURRENT_SOURCE_DIR}/cmake + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) -project(eCAL) +project(eCAL) # Set CMake policy behavior (alias targets) cmake_policy(SET CMP0028 NEW) @@ -76,7 +77,7 @@ message(STATUS "Prefix Path: ${CMAKE_PREFIX_PATH}") # third party dependencies as requested # -------------------------------------------------------- if (ECAL_THIRDPARTY_BUILD_PROTOBUF) - list(APPEND as_subproject Protobuf) + list(APPEND as_subproject Protobuf) if(MSVC) # supress google protobuf warnings for windows platform set(CMAKE_CXX_FLAGS_OLD "${CMAKE_CXX_FLAGS}") @@ -106,7 +107,7 @@ if (ECAL_THIRDPARTY_BUILD_PROTOBUF) endif() if (ECAL_THIRDPARTY_BUILD_SPDLOG) - list(APPEND as_subproject spdlog) + list(APPEND as_subproject spdlog) add_subdirectory(thirdparty/spdlog) add_library(spdlog::spdlog ALIAS spdlog) endif () @@ -114,7 +115,7 @@ endif () if (ECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS) - list(APPEND as_subproject CMakeFunctions) + list(APPEND as_subproject CMakeFunctions) endif() macro(find_package) @@ -136,7 +137,7 @@ set(eCAL_VERSION_MAJOR ${GIT_REVISION_MAYOR}) set(eCAL_VERSION_MINOR ${GIT_REVISION_MINOR}) set(eCAL_VERSION_PATCH ${GIT_REVISION_PATCH}) set(eCAL_VERSION_STRING ${eCAL_VERSION_MAJOR}.${eCAL_VERSION_MINOR}.${eCAL_VERSION_PATCH}) -set(eCAL_VERSION ${eCAL_VERSION_STRING}) +set(eCAL_VERSION ${eCAL_VERSION_STRING}) include(helper_functions/ecal_add_functions) include(helper_functions/ecal_helper_functions) @@ -152,7 +153,7 @@ endif() # -------------------------------------------------------- if(WIN32 AND HAS_QT5) if (NOT DEFINED ENV{QT5_ROOT_DIRECTORY} AND NOT DEFINED ENV{QT5_ROOT}) - # If the QT5_ROOT_DIRECTORY Variable is not set, there is still a chance that + # If the QT5_ROOT_DIRECTORY Variable is not set, there is still a chance that # the user set the CMAKE_PREFIX_PATH himself. Thus we try to find # Qt5 Core just to see if that works. If we can find Qt, we assume # that the user knows what he is doing. @@ -173,8 +174,8 @@ if(WIN32 AND HAS_QT5) endif () if (DEFINED ENV{QT5_ROOT_DIRECTORY}) set(qt_directory $ENV{QT5_ROOT_DIRECTORY}) - endif () - + endif () + qt_msvc_path(qt_subfolder) list(APPEND CMAKE_PREFIX_PATH ${qt_directory}/${qt_subfolder}/) message(STATUS "Searching for QT in ${qt_directory}/${qt_subfolder}/") @@ -266,13 +267,13 @@ if(WIN32) set(CMAKE_DEBUG_POSTFIX d) set(CMAKE_MINSIZEREL_POSTFIX minsize) set(CMAKE_RELWITHDEBINFO_POSTFIX reldbg) -endif() +endif() # -------------------------------------------------------- # protobuf utilities -# -------------------------------------------------------- -add_subdirectory(contrib/ecalproto/src) - +# -------------------------------------------------------- +add_subdirectory(contrib/ecalproto/src) + # -------------------------------------------------------- # ecal core internal protobuf # -------------------------------------------------------- @@ -391,26 +392,26 @@ write_basic_package_version_file( configure_package_config_file( cmake/${PROJECT_NAME}Config.cmake.in ${eCAL_config} - INSTALL_DESTINATION ${${PROJECT_NAME}_install_cmake_dir} + INSTALL_DESTINATION ${${PROJECT_NAME}_install_cmake_dir} PATH_VARS ${PROJECT_NAME}_install_include_dir ${PROJECT_NAME}_install_cmake_dir -) +) install(FILES ${eCAL_config} ${eCAL_config_version} DESTINATION ${eCAL_install_cmake_dir} COMPONENT sdk ) - -install(FILES + +install(FILES cmake/helper_functions/ecal_add_functions.cmake cmake/helper_functions/ecal_helper_functions.cmake cmake/helper_functions/ecal_install_functions.cmake DESTINATION ${${PROJECT_NAME}_install_cmake_dir}/helper_functions COMPONENT sdk -) - -install(EXPORT eCALCoreTargets +) + +install(EXPORT eCALCoreTargets FILE ${PROJECT_NAME}Targets.cmake - DESTINATION ${eCAL_install_cmake_dir} + DESTINATION ${eCAL_install_cmake_dir} NAMESPACE eCAL:: COMPONENT sdk ) diff --git a/app/mon/eCALMon/CMakeLists.txt b/app/mon/eCALMon/CMakeLists.txt index 21d56922ba..f8939e6d30 100644 --- a/app/mon/eCALMon/CMakeLists.txt +++ b/app/mon/eCALMon/CMakeLists.txt @@ -179,7 +179,6 @@ ecal_add_app_qt(${PROJECT_NAME} ${autogen_ui} ) -create_targets_protobuf() target_link_libraries (${PROJECT_NAME} protobuf::libprotobuf simpleini::simpleini diff --git a/app/mon/eCALMonPlugins/ProtobufReflection/CMakeLists.txt b/app/mon/eCALMonPlugins/ProtobufReflection/CMakeLists.txt index b555a0d8ef..dc58cda56e 100644 --- a/app/mon/eCALMonPlugins/ProtobufReflection/CMakeLists.txt +++ b/app/mon/eCALMonPlugins/ProtobufReflection/CMakeLists.txt @@ -54,7 +54,6 @@ qt5_wrap_ui(autogen_ui ${${PROJECT_NAME}_ui}) ecal_add_mon_plugin(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_src} ${${PROJECT_NAME}_header} ${${PROJECT_NAME}_ui} ${autogen_ui}) -create_targets_protobuf() target_link_libraries (${PROJECT_NAME} Qt5::Widgets eCAL::core eCAL::pb protobuf::libprotobuf MonitorTreeView eCAL::mon_plugin_lib) if(MSVC) diff --git a/app/mon/eCALMonPlugins/RawDataReflection/CMakeLists.txt b/app/mon/eCALMonPlugins/RawDataReflection/CMakeLists.txt index 3f8f1321ee..6e7a3ab9cb 100644 --- a/app/mon/eCALMonPlugins/RawDataReflection/CMakeLists.txt +++ b/app/mon/eCALMonPlugins/RawDataReflection/CMakeLists.txt @@ -50,7 +50,6 @@ qt5_wrap_ui(autogen_ui ${${PROJECT_NAME}_ui}) ecal_add_mon_plugin(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_src} ${${PROJECT_NAME}_header} ${${PROJECT_NAME}_ui} ${autogen_ui}) -create_targets_protobuf() target_link_libraries (${PROJECT_NAME} Qt5::Widgets eCAL::core eCAL::mon_plugin_lib) if(MSVC) diff --git a/app/mon/eCALMonPlugins/StringReflection/CMakeLists.txt b/app/mon/eCALMonPlugins/StringReflection/CMakeLists.txt index b714eef96e..4b35c77c34 100644 --- a/app/mon/eCALMonPlugins/StringReflection/CMakeLists.txt +++ b/app/mon/eCALMonPlugins/StringReflection/CMakeLists.txt @@ -50,7 +50,6 @@ qt5_wrap_ui(autogen_ui ${${PROJECT_NAME}_ui}) ecal_add_mon_plugin(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_src} ${${PROJECT_NAME}_header} ${${PROJECT_NAME}_ui} ${autogen_ui}) -create_targets_protobuf() target_link_libraries (${PROJECT_NAME} Qt5::Widgets eCAL::core eCAL::mon_plugin_lib) if(MSVC) diff --git a/app/mon/eCALTopic/src/CMakeLists.txt b/app/mon/eCALTopic/src/CMakeLists.txt index fc0de59e9b..2dc3a9d3f7 100644 --- a/app/mon/eCALTopic/src/CMakeLists.txt +++ b/app/mon/eCALTopic/src/CMakeLists.txt @@ -39,8 +39,6 @@ target_include_directories(${PROJECT_NAME} target_compile_definitions(${PROJECT_NAME} PRIVATE $<$:PCRE_STATIC;_UNICODE>) -create_targets_protobuf() - target_link_libraries(${PROJECT_NAME} protobuf::libprotobuf tclap::tclap diff --git a/cmake/find_scripts/Findasio.cmake b/cmake/Modules/Findasio.cmake similarity index 75% rename from cmake/find_scripts/Findasio.cmake rename to cmake/Modules/Findasio.cmake index ea92f78e80..b6aaa4b7c3 100644 --- a/cmake/find_scripts/Findasio.cmake +++ b/cmake/Modules/Findasio.cmake @@ -1,28 +1,26 @@ find_path(Asio_INCLUDE_DIR NAMES asio.hpp - PATHS - ${CMAKE_SOURCE_DIR}/thirdparty/asio/asio/include - include -) + HINTS + include ${CONAN_ASIO_ROOT}/include + ${CMAKE_SOURCE_DIR}/thirdparty/asio/asio/include + include + ) if(Asio_INCLUDE_DIR-NOTFOUND) message(FATAL_ERROR "Could not find Asio library") - set(Asio_FOUND False) + set(Asio_FOUND FALSE) else() - set(Asio_FOUND True) - # Add workaround for stupid eprosima_find_package() + set(Asio_FOUND TRUE) set(ASIO_INCLUDE_DIR ${Asio_INCLUDE_DIR}) endif() if(Asio_FOUND) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Asio - REQUIRED_VARS Asio_INCLUDE_DIR - ) + REQUIRED_VARS Asio_INCLUDE_DIR) if(NOT TARGET asio::asio) set(Asio_INCLUDE_DIRS ${Asio_INCLUDE_DIR}) - add_library(asio::asio INTERFACE IMPORTED) set_target_properties(asio::asio PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${Asio_INCLUDE_DIR} diff --git a/cmake/find_scripts/Findsimpleini.cmake b/cmake/Modules/Findsimpleini.cmake similarity index 74% rename from cmake/find_scripts/Findsimpleini.cmake rename to cmake/Modules/Findsimpleini.cmake index 3f518b45dc..453d509815 100644 --- a/cmake/find_scripts/Findsimpleini.cmake +++ b/cmake/Modules/Findsimpleini.cmake @@ -1,29 +1,28 @@ find_path(simpleini_INCLUDE_DIR NAMES SimpleIni.h - PATHS - include - ${CMAKE_SOURCE_DIR}/thirdparty/simpleini -) + HINTS + include + ${CONAN_SIMPLEINI_ROOT}/include + ${CMAKE_SOURCE_DIR}/thirdparty/simpleini + ) if(simpleini_INCLUDE_DIR-NOTFOUND) message(FATAL_ERROR "Could not find simpleini library") - set(simpleini_FOUND False) + set(simpleini_FOUND FALSE) else() - set(simpleini_FOUND True) + set(simpleini_FOUND TRUE) endif() if(simpleini_FOUND) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(simpleini - REQUIRED_VARS simpleini_INCLUDE_DIR - ) + REQUIRED_VARS simpleini_INCLUDE_DIR) if(NOT TARGET simpleini::simpleini) set(simpleini_INCLUDE_DIRS ${simpleini_INCLUDE_DIR}) - add_library(simpleini::simpleini INTERFACE IMPORTED) set_target_properties(simpleini::simpleini PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${simpleini_INCLUDE_DIR}) mark_as_advanced(simpleini_INCLUDE_DIR) endif() -endif() \ No newline at end of file +endif() diff --git a/cmake/find_scripts/Findtclap.cmake b/cmake/Modules/Findtclap.cmake similarity index 73% rename from cmake/find_scripts/Findtclap.cmake rename to cmake/Modules/Findtclap.cmake index dba8d177b1..9ecd49aea5 100644 --- a/cmake/find_scripts/Findtclap.cmake +++ b/cmake/Modules/Findtclap.cmake @@ -1,29 +1,28 @@ find_path(tclap_INCLUDE_DIR NAMES tclap/Arg.h - PATHS - include - ${CMAKE_SOURCE_DIR}/thirdparty/tclap/include -) + HINTS + include + ${CONAN_TCLAP_ROOT}/include + ${CMAKE_SOURCE_DIR}/thirdparty/tclap/include + ) if(tclap_INCLUDE_DIR-NOTFOUND) message(FATAL_ERROR "Could not find tclap library") - set(tclap_FOUND False) + set(tclap_FOUND FALSE) else() - set(tclap_FOUND True) + set(tclap_FOUND TRUE) endif() if(tclap_FOUND) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(tclap - REQUIRED_VARS tclap_INCLUDE_DIR - ) + REQUIRED_VARS tclap_INCLUDE_DIR) if(NOT TARGET tclap::tclap) set(tclap_INCLUDE_DIRS ${tclap_INCLUDE_DIR}) - add_library(tclap::tclap INTERFACE IMPORTED) set_target_properties(tclap::tclap PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${tclap_INCLUDE_DIR}) mark_as_advanced(tclap_INCLUDE_DIRS) endif() -endif() \ No newline at end of file +endif() diff --git a/cmake/eCALConfig.cmake.in b/cmake/eCALConfig.cmake.in index 953d935ee0..05ecc5f6b4 100644 --- a/cmake/eCALConfig.cmake.in +++ b/cmake/eCALConfig.cmake.in @@ -45,6 +45,5 @@ endif() find_package(CMakeFunctions REQUIRED) -find_package(Protobuf REQUIRED) -create_targets_protobuf() +find_package(protobuf REQUIRED) find_package(Threads REQUIRED) diff --git a/conanfile.txt b/conanfile.txt new file mode 100644 index 0000000000..0f750541ff --- /dev/null +++ b/conanfile.txt @@ -0,0 +1,13 @@ +[requires] +Qt/5.12.4@kwc_bintray/stable +protobuf/3.5.1@bincrafters/stable +protoc_installer/3.5.1@bincrafters/stable +spdlog/0.16.3@kwc_bintray/stable + +tclap/1.2.2@kwc_bintray/stable +simpleini/4.17@kwc_bintray/stable +asio/1.14.0@kwc_bintray/stable +hdf5/1.8.21@kwc_bintray/stable + +[generators] +cmake_paths diff --git a/contrib/ecalhdf5/src/CMakeLists.txt b/contrib/ecalhdf5/src/CMakeLists.txt index 3921cc3f48..fb74b31aea 100644 --- a/contrib/ecalhdf5/src/CMakeLists.txt +++ b/contrib/ecalhdf5/src/CMakeLists.txt @@ -18,11 +18,7 @@ project(hdf5) -if (WIN32) - find_package(HDF5 COMPONENTS C NO_MODULE REQUIRED static) -else() - find_package(HDF5 COMPONENTS C REQUIRED) -endif() +find_package(HDF5 COMPONENTS C REQUIRED) set(ecalhdf5_src eh5_meas.cpp diff --git a/contrib/ecalproto/src/CMakeLists.txt b/contrib/ecalproto/src/CMakeLists.txt index 6a38ad8282..09570dadce 100644 --- a/contrib/ecalproto/src/CMakeLists.txt +++ b/contrib/ecalproto/src/CMakeLists.txt @@ -17,7 +17,6 @@ # ========================= eCAL LICENSE ================================= find_package(Protobuf REQUIRED) -create_targets_protobuf() project(proto) @@ -45,7 +44,6 @@ target_include_directories(${PROJECT_NAME} PUBLIC $ ) -create_targets_protobuf() target_link_libraries(${PROJECT_NAME} PUBLIC protobuf::libprotobuf) ecal_install_library(${PROJECT_NAME}) diff --git a/ecal/pb/src/CMakeLists.txt b/ecal/pb/src/CMakeLists.txt index 49988d4bd6..f62df76d7d 100644 --- a/ecal/pb/src/CMakeLists.txt +++ b/ecal/pb/src/CMakeLists.txt @@ -19,7 +19,6 @@ project(pb) find_package(Protobuf REQUIRED) -create_targets_protobuf() set(ProtoFiles ${CMAKE_CURRENT_SOURCE_DIR}/ecal/pb/ecal.proto diff --git a/samples/cpp/misc/proto_dyn/src/CMakeLists.txt b/samples/cpp/misc/proto_dyn/src/CMakeLists.txt index 5f220cb2be..bd29145d55 100644 --- a/samples/cpp/misc/proto_dyn/src/CMakeLists.txt +++ b/samples/cpp/misc/proto_dyn/src/CMakeLists.txt @@ -31,7 +31,6 @@ target_include_directories(${PROJECT_NAME} PRIVATE .) target_link_libraries(${PROJECT_NAME} eCAL::core) -create_targets_protobuf() target_link_libraries(${PROJECT_NAME} protobuf::libprotobuf) ecal_install_sample(${PROJECT_NAME}) diff --git a/samples/cpp/misc/proto_dyn_json/src/CMakeLists.txt b/samples/cpp/misc/proto_dyn_json/src/CMakeLists.txt index e0727dada5..e3c488e1a6 100644 --- a/samples/cpp/misc/proto_dyn_json/src/CMakeLists.txt +++ b/samples/cpp/misc/proto_dyn_json/src/CMakeLists.txt @@ -31,7 +31,6 @@ target_include_directories(${PROJECT_NAME} PRIVATE .) target_link_libraries(${PROJECT_NAME} eCAL::core) find_package(Protobuf REQUIRED) -create_targets_protobuf() target_link_libraries(${PROJECT_NAME} protobuf::libprotobuf) ecal_install_sample(${PROJECT_NAME}) diff --git a/samples/cpp/multiple/multiple_rec_cb/src/CMakeLists.txt b/samples/cpp/multiple/multiple_rec_cb/src/CMakeLists.txt index 1c88a27942..4584077b53 100644 --- a/samples/cpp/multiple/multiple_rec_cb/src/CMakeLists.txt +++ b/samples/cpp/multiple/multiple_rec_cb/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(multiple_rec_cb) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(multiple_rec_cb_src multiple_rec_cb.cpp multiple_rec_cb_person.cpp diff --git a/samples/cpp/multiple/multiple_snd/src/CMakeLists.txt b/samples/cpp/multiple/multiple_snd/src/CMakeLists.txt index 31403c7af6..c91e3ef1ea 100644 --- a/samples/cpp/multiple/multiple_snd/src/CMakeLists.txt +++ b/samples/cpp/multiple/multiple_snd/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(multiple_snd) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(multiple_snd_src multiple_snd.cpp multiple_snd_person.cpp diff --git a/samples/cpp/person/person_rec/src/CMakeLists.txt b/samples/cpp/person/person_rec/src/CMakeLists.txt index ffec5b22fc..780d646c07 100644 --- a/samples/cpp/person/person_rec/src/CMakeLists.txt +++ b/samples/cpp/person/person_rec/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(person_rec) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(person_rec_src person_rec.cpp ) diff --git a/samples/cpp/person/person_rec_events/src/CMakeLists.txt b/samples/cpp/person/person_rec_events/src/CMakeLists.txt index 504061df25..88a911df2b 100644 --- a/samples/cpp/person/person_rec_events/src/CMakeLists.txt +++ b/samples/cpp/person/person_rec_events/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# ========================= eCAL LICENSE ================================= +# =====n=================== eCAL LICENSE ================================= # # Copyright (C) 2016 - 2019 Continental Corporation # @@ -21,8 +21,6 @@ project(person_rec_events) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(person_rec_events_src person_rec_events.cpp ) diff --git a/samples/cpp/person/person_snd/src/CMakeLists.txt b/samples/cpp/person/person_snd/src/CMakeLists.txt index 125bf48465..fde8be62f1 100644 --- a/samples/cpp/person/person_snd/src/CMakeLists.txt +++ b/samples/cpp/person/person_snd/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(person_snd) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(person_snd_src person_snd.cpp ) diff --git a/samples/cpp/person/person_snd_events/src/CMakeLists.txt b/samples/cpp/person/person_snd_events/src/CMakeLists.txt index 5c042c3fda..3ae8503000 100644 --- a/samples/cpp/person/person_snd_events/src/CMakeLists.txt +++ b/samples/cpp/person/person_snd_events/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(person_snd_events) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(person_snd_events_src person_snd_events.cpp ) diff --git a/samples/cpp/person/person_snd_inproc/src/CMakeLists.txt b/samples/cpp/person/person_snd_inproc/src/CMakeLists.txt index 0e6f51d7f4..1ce3526723 100644 --- a/samples/cpp/person/person_snd_inproc/src/CMakeLists.txt +++ b/samples/cpp/person/person_snd_inproc/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(person_snd_inproc) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(person_snd_inproc_src person_snd_inproc.cpp ) diff --git a/samples/cpp/person/person_snd_lcm/src/CMakeLists.txt b/samples/cpp/person/person_snd_lcm/src/CMakeLists.txt index c6129647b8..34c6e9ce97 100644 --- a/samples/cpp/person/person_snd_lcm/src/CMakeLists.txt +++ b/samples/cpp/person/person_snd_lcm/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(person_snd_lcm) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(person_snd_lcm_src person_snd_lcm.cpp ) diff --git a/samples/cpp/person/person_snd_multicast/src/CMakeLists.txt b/samples/cpp/person/person_snd_multicast/src/CMakeLists.txt index f504adccf5..f0a456c401 100644 --- a/samples/cpp/person/person_snd_multicast/src/CMakeLists.txt +++ b/samples/cpp/person/person_snd_multicast/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(person_snd_multicast) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(person_snd_multicast_src person_snd_multicast.cpp ) diff --git a/samples/cpp/person/person_snd_rtps/src/CMakeLists.txt b/samples/cpp/person/person_snd_rtps/src/CMakeLists.txt index 8b14418687..e3a940fa71 100644 --- a/samples/cpp/person/person_snd_rtps/src/CMakeLists.txt +++ b/samples/cpp/person/person_snd_rtps/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(person_snd_rtps) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(person_snd_rtps_src person_snd_rtps.cpp ) diff --git a/samples/cpp/person/person_snd_unicast/src/CMakeLists.txt b/samples/cpp/person/person_snd_unicast/src/CMakeLists.txt index a8cf649ed5..a03fc3a6ea 100644 --- a/samples/cpp/person/person_snd_unicast/src/CMakeLists.txt +++ b/samples/cpp/person/person_snd_unicast/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(person_snd_unicast) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(person_snd_unicast_src person_snd_unicast.cpp ) diff --git a/samples/cpp/services/math_client/src/CMakeLists.txt b/samples/cpp/services/math_client/src/CMakeLists.txt index 6fab29e5c5..e3786b00ef 100644 --- a/samples/cpp/services/math_client/src/CMakeLists.txt +++ b/samples/cpp/services/math_client/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(math_client) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(math_client_src math_client.cpp ) diff --git a/samples/cpp/services/math_server/src/CMakeLists.txt b/samples/cpp/services/math_server/src/CMakeLists.txt index 9bc3af1e17..35c6683bfb 100644 --- a/samples/cpp/services/math_server/src/CMakeLists.txt +++ b/samples/cpp/services/math_server/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(math_server) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(math_server_src math_server.cpp ) diff --git a/samples/cpp/services/ping_client/src/CMakeLists.txt b/samples/cpp/services/ping_client/src/CMakeLists.txt index 159a8a272e..e719433f2f 100644 --- a/samples/cpp/services/ping_client/src/CMakeLists.txt +++ b/samples/cpp/services/ping_client/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(ping_client) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(ping_client_src ping_client.cpp ) diff --git a/samples/cpp/services/ping_server/src/CMakeLists.txt b/samples/cpp/services/ping_server/src/CMakeLists.txt index 59ef070ccc..d85cbe46bb 100644 --- a/samples/cpp/services/ping_server/src/CMakeLists.txt +++ b/samples/cpp/services/ping_server/src/CMakeLists.txt @@ -21,8 +21,6 @@ project(ping_server) find_package(eCAL REQUIRED) find_package(Protobuf REQUIRED) -create_targets_protobuf() - set(ping_server_src ping_server.cpp ) diff --git a/thirdparty/cmake_functions/target_definitions/targets_protobuf.cmake b/thirdparty/cmake_functions/target_definitions/targets_protobuf.cmake index 3502b8dbb9..b5ec02e97f 100644 --- a/thirdparty/cmake_functions/target_definitions/targets_protobuf.cmake +++ b/thirdparty/cmake_functions/target_definitions/targets_protobuf.cmake @@ -45,4 +45,4 @@ function(create_targets_protobuf) ) endif (NOT TARGET protobuf::libprotobuf) -endfunction() \ No newline at end of file +endfunction()