Skip to content

Commit

Permalink
Modernize CMakeLists.txt for Udp
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosbento committed Nov 13, 2023
1 parent 2768e35 commit f51e2a6
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions Udp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
#
# Copyright 2023- ECMWF.
#
# This software is licensed under the terms of the Apache Licence version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
#

# ==============================================================================
# ECFLOW UDP library

set(LIB_TARGET libecflow_udp)

set(${LIB_TARGET}_srcs
# HEADERS
# Headers
src/ClientAPI.hpp
src/RequestHandler.hpp
src/Trace.hpp
src/UDPServer.hpp
src/UDPServerEnvironment.hpp
src/UDPServerOptions.hpp
# SOURCES
# Sources
src/ClientAPI.cpp
src/RequestHandler.cpp
src/Trace.cpp
Expand All @@ -21,19 +30,20 @@ set(${LIB_TARGET}_srcs
)

ecbuild_add_library(
TARGET ${LIB_TARGET}
TARGET
${LIB_TARGET}
TYPE STATIC
NOINSTALL
SOURCES ${${LIB_TARGET}_srcs}
SOURCES
${${LIB_TARGET}_srcs}
PRIVATE_INCLUDES
src
../Client/src
../json
PUBLIC_LIBS
libclient
pthread
$<$<BOOL:${OPENSSL_FOUND}>:OpenSSL::SSL>
Boost::boost
$<$<BOOL:${OPENSSL_FOUND}>:OpenSSL::SSL>
)
target_clangformat(${LIB_TARGET})

Expand All @@ -43,7 +53,7 @@ target_clangformat(${LIB_TARGET})
set(SERVER_TARGET ecflow_udp)

set(${SERVER_TARGET}_srcs
# SOURCES
# Sources
src/UDPServerMain.cpp
)

Expand All @@ -52,9 +62,9 @@ ecbuild_add_executable(
SOURCES ${${SERVER_TARGET}_srcs}
INCLUDES
src
../ACore/src # Needed only to #include "ecflow_version.h"
LIBS
${LIB_TARGET}
core # Needed only to #include "ecflow_version.h"
)
set_target_properties(${SERVER_TARGET} PROPERTIES
INSTALL_RPATH ""
Expand Down

0 comments on commit f51e2a6

Please sign in to comment.