-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (26 loc) · 979 Bytes
/
CMakeLists.txt
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.5)
project(crails-cms-private-page-plugin)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
find_package(PkgConfig)
pkg_check_modules(CRAILS_CMS REQUIRED
libcrails-cms>=2.0.0
libcrails-templates>=2.0.0
libcrails-json-views>=2.0.0
libcrails-html-views>=2.0.0
libcrails-paginator>=2.0.0
libcrails-signin>=2.0.0
)
include_directories(. ../.. ${CRAILS_CMS_INCLUDE_DIRS})
link_directories(../../build)
set(ENV{CRAILS_CMS_INCLUDE_DIRS} "${CRAILS_CMS_INCLUDE_DIRS}")
execute_process(COMMAND ./prebuild.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB_RECURSE plugin_files
app/*.cpp app/*.cxx
lib/*.cpp lib/*.cxx)
add_library(private-page SHARED ${plugin_files})
add_definitions(-DWITH_ODB)
set_target_properties(private-page PROPERTIES ENABLE_EXPORTS ON)
set_target_properties(private-page PROPERTIES PREFIX "")
target_link_libraries(private-page
${CRAILS_CMS_LIBRARIES}
crails-app)