1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-23 00:00:01 +01:00
VILLASnode/common/lib/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

119 lines
2.6 KiB
Text
Raw Normal View History

2018-08-21 00:25:44 +02:00
## CMakeLists.txt
#
# @author Daniel Krebs <github@daniel-krebs.net>
2019-01-13 00:42:26 +01:00
# @copyright 2014-2019, RWTH Institute for Automation of Complex Power Systems (ACS)
2018-08-21 00:25:44 +02:00
# @license GNU General Public License (version 3)
#
# VILLAScommon
2018-08-21 00:25:44 +02:00
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
add_library(villas-common SHARED
2019-04-07 15:12:32 +02:00
advio.cpp
buffer.cpp
json_buffer.cpp
2019-04-07 15:12:32 +02:00
compat.cpp
hist.cpp
2019-04-12 09:45:12 +02:00
dsp/pid.cpp
2019-04-07 15:12:32 +02:00
kernel/kernel.cpp
2018-10-19 16:32:44 +02:00
kernel/kernel.cpp
kernel/rt.cpp
2019-04-07 15:12:32 +02:00
list.cpp
2018-10-19 14:33:10 +02:00
log.cpp
log_legacy.cpp
memory.cpp
memory_manager.cpp
plugin.cpp
2019-04-07 15:12:32 +02:00
table.cpp
task.cpp
timing.cpp
utils.cpp
2018-08-27 11:09:25 +02:00
cpuset.cpp
2018-10-19 16:32:44 +02:00
terminal.cpp
2018-08-27 11:09:25 +02:00
version.cpp
2019-04-07 15:12:32 +02:00
common.cpp
tool.cpp
base64.cpp
popen.cpp
2018-08-21 00:25:44 +02:00
)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
2019-04-07 15:12:32 +02:00
target_sources(villas-common PRIVATE tsc.cpp)
2018-10-21 20:25:55 +01:00
endif()
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
target_sources(villas-common PRIVATE
2019-04-07 15:12:32 +02:00
kernel/pci.cpp
2018-08-21 15:55:32 +02:00
kernel/vfio.cpp
2019-04-07 15:12:32 +02:00
# kernel/vfio_legacy.cpp
2018-08-21 15:55:32 +02:00
)
endif()
2018-08-21 00:25:44 +02:00
target_include_directories(villas-common PUBLIC
${OPENSSL_INCLUDE_DIR}
${CURL_INCLUDE_DIRS}
2018-08-23 13:15:20 +02:00
${PROJECT_BINARY_DIR}/include
${PROJECT_SOURCE_DIR}/include
2018-08-21 00:25:44 +02:00
)
target_link_libraries(villas-common PUBLIC
2018-08-21 15:55:53 +02:00
PkgConfig::JANSSON
${OPENSSL_LIBRARIES}
${CURL_LIBRARIES}
2018-08-21 12:19:41 +02:00
${CMAKE_DL_LIBS}
spdlog::spdlog
2018-12-04 14:12:22 +01:00
stdc++
2018-08-21 00:25:44 +02:00
)
2019-04-06 18:21:47 +02:00
if(WITH_CONFIG)
target_link_libraries(villas-common PUBLIC
PkgConfig::LIBCONFIG
)
endif()
target_compile_definitions(villas-common PUBLIC
-D__STDC_FORMAT_MACROS -D_GNU_SOURCE
)
2019-01-07 14:46:40 +01:00
2019-01-13 00:43:17 +01:00
set_target_properties(villas-common PROPERTIES
VERSION ${CMAKE_PROJECT_VERSION}
SOVERSION 1
)
2019-01-07 14:46:40 +01:00
install(
TARGETS villas-common
EXPORT VILLASCommonConfig
COMPONENT lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/include/villas/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/villas
COMPONENT devel
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
2019-01-07 14:46:40 +01:00
)
install(
DIRECTORY ${PROJECT_BINARY_DIR}/include/villas/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/villas
COMPONENT devel
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
2019-01-07 14:46:40 +01:00
)