CMakeLists.txt 1.15 KB
Newer Older
1 2 3 4 5 6 7 8
cmake_minimum_required(VERSION 3.0)
project(BEAT_CORE_CXX_INTEGERS_ECHO_LEGACY)


set(BEAT_BACKEND_CXX_DIR "/usr/local/beat")


# CMake setup
9 10
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48


# Retrieve the dependencies
find_package(Boost REQUIRED)


# Setup the search paths
include_directories(
    "${BEAT_BACKEND_CXX_DIR}/include"
    "${Boost_INCLUDE_DIRS}"
)

link_directories(
    "${BEAT_BACKEND_CXX_DIR}/bin"
)


# List the source files
set(HEADERS "algorithm.h"
            "beat_setup.h"
            "user_single_integer_1.h"
)

set(SRCS "algorithm.cpp"
         "beat_setup.cpp"
         "user_single_integer_1.cpp"
)

# Create and link the library
add_library(cxx_integers_echo_legacy SHARED ${SRCS} ${HEADERS})

target_link_libraries(cxx_integers_echo_legacy beat_backend_cxx)
set_target_properties(cxx_integers_echo_legacy PROPERTIES
                                               COMPILE_FLAGS "-fPIC"
                                               OUTPUT_NAME "1"
                                               PREFIX ""
                                               LIBRARY_OUTPUT_DIRECTORY "${BEAT_CORE_CXX_INTEGERS_ECHO_LEGACY_SOURCE_DIR}"
)