-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
33 lines (27 loc) · 1.16 KB
/
CMakeLists.txt
File metadata and controls
33 lines (27 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
cmake_minimum_required(VERSION 3.6)
set(CMAKE_CXX_STANDARD 11 LANGUAGES CXX)
add_compile_options(-Wall -Wextra)
project("URM-Extensions")
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
include(GNUInstallDirs)
# Install the extension "UrmPlugin.so" lib
file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/Extensions/*.cpp")
add_library(UrmPlugin ${SOURCES})
set_target_properties(UrmPlugin PROPERTIES VERSION 1.0.0 SOVERSION 1)
target_link_libraries(UrmPlugin UrmExtAPIs RestuneCore UrmAuxUtils)
target_include_directories(UrmPlugin PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Extensions/Include)
# install to standard /usr/lib or /lib
install(TARGETS UrmPlugin DESTINATION ${CMAKE_INSTALL_LIBDIR}/urm/)
# Install the configs to /etc/urm/custom
file(GLOB pluginConfigs "${CMAKE_CURRENT_SOURCE_DIR}/Configs/*.yaml")
install(
FILES ${pluginConfigs}
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/urm/target
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
# Install target-configs to /etc/urm/target/
file(GLOB targetConfigs "${CMAKE_CURRENT_SOURCE_DIR}/Configs/target-specific/*")
install(
DIRECTORY ${targetConfigs}
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/urm/target
)