From e12fa847c70b16289f930030eeacca843e7e694e Mon Sep 17 00:00:00 2001 From: Cyrille Favreau Date: Thu, 4 Feb 2021 16:08:38 +0100 Subject: [PATCH] Made brayns and braynsRockets libraries available to 3rd party applications --- apps/BraynsBenchmark/CMakeLists.txt | 4 ++++ apps/BraynsService/CMakeLists.txt | 6 ++++++ apps/BraynsViewer/CMakeLists.txt | 4 ++++ brayns/CMakeLists.txt | 5 ----- plugins/Rockets/CMakeLists.txt | 1 - 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/BraynsBenchmark/CMakeLists.txt b/apps/BraynsBenchmark/CMakeLists.txt index a9654c373..ce0406ee8 100644 --- a/apps/BraynsBenchmark/CMakeLists.txt +++ b/apps/BraynsBenchmark/CMakeLists.txt @@ -10,4 +10,8 @@ set(BRAYNSBENCHMARK_LINK_LIBRARIES PUBLIC brayns braynsCommon braynsIO braynsParameters ) +if(BRAYNS_NETWORKING_ENABLED) + list(APPEND BRAYNSBENCHMARK_LINK_LIBRARIES PRIVATE braynsRockets) +endif() + common_application(braynsBenchmark) diff --git a/apps/BraynsService/CMakeLists.txt b/apps/BraynsService/CMakeLists.txt index 9d110846a..ddc7a3eb6 100644 --- a/apps/BraynsService/CMakeLists.txt +++ b/apps/BraynsService/CMakeLists.txt @@ -5,5 +5,11 @@ # This file is part of Brayns set(BRAYNSSERVICE_SOURCES main.cpp) + set(BRAYNSSERVICE_LINK_LIBRARIES PUBLIC brayns ${libuv_LIBRARIES}) + +if(BRAYNS_NETWORKING_ENABLED) + list(APPEND BRAYNSSERVICE_LINK_LIBRARIES PRIVATE braynsRockets) +endif() + common_application(braynsService) diff --git a/apps/BraynsViewer/CMakeLists.txt b/apps/BraynsViewer/CMakeLists.txt index 79a2ba1ad..bb7f6db06 100644 --- a/apps/BraynsViewer/CMakeLists.txt +++ b/apps/BraynsViewer/CMakeLists.txt @@ -14,4 +14,8 @@ set(BRAYNSVIEWER_LINK_LIBRARIES braynsUI ) +if(BRAYNS_NETWORKING_ENABLED) + list(APPEND BRAYNSVIEWER_LINK_LIBRARIES PRIVATE braynsRockets) +endif() + common_application(braynsViewer) diff --git a/brayns/CMakeLists.txt b/brayns/CMakeLists.txt index 8328f42bb..3db35233d 100644 --- a/brayns/CMakeLists.txt +++ b/brayns/CMakeLists.txt @@ -24,9 +24,4 @@ set(BRAYNS_LINK_LIBRARIES PUBLIC braynsParameters braynsCommon braynsEngine PRIVATE braynsIO braynsPluginAPI braynsManipulators braynsTasks) -if(TARGET braynsRockets) - list(APPEND BRAYNS_LINK_LIBRARIES PRIVATE braynsRockets) -endif() - -set(BRAYNS_OMIT_EXPORT ON) common_library(brayns) diff --git a/plugins/Rockets/CMakeLists.txt b/plugins/Rockets/CMakeLists.txt index c05a7c81f..132dc083f 100644 --- a/plugins/Rockets/CMakeLists.txt +++ b/plugins/Rockets/CMakeLists.txt @@ -44,7 +44,6 @@ endif() set(BRAYNSROCKETS_OMIT_LIBRARY_HEADER ON) set(BRAYNSROCKETS_OMIT_VERSION_HEADERS ON) -set(BRAYNSROCKETS_OMIT_EXPORT ON) set(BRAYNSROCKETS_INCLUDE_NAME rocketsplugin) common_library(braynsRockets) target_include_directories(braynsRockets SYSTEM PRIVATE ${FREEIMAGE_INCLUDE_DIRS})