-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
71 lines (58 loc) · 2.33 KB
/
CMakeLists.txt
File metadata and controls
71 lines (58 loc) · 2.33 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
cmake_minimum_required(VERSION 3.5)
project(rete VERSION 0.13.3)
add_definitions(-Wall -Wextra -pedantic -Wnon-virtual-dtor -Werror=unused-result)
set(CMAKE_CXX_STANDARD 14)
option(DEBUG_PARSING "enable debug output while parsing rules" false)
if(${DEBUG_PARSING})
add_definitions(-DDEBUG_PARSING)
endif()
option(DEBUG_AST "enable debug output while constructing AST" false)
if (${DEBUG_AST})
add_definitions(-DDEBUG_AST_CONSTRUCTION)
endif()
option(RETE_PARSER_VERBOSE "more output of the rule parser" false)
if (${RETE_PARSER_VERBOSE})
add_definitions(-DRETE_PARSER_VERBOSE)
endif()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
add_subdirectory(rete-core)
add_subdirectory(rete-rdf)
add_subdirectory(rete-reasoner)
add_subdirectory(examples)
enable_testing()
add_subdirectory(test)
# configure for cmake install
set(RETE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
configure_file("rete.pc.in" "rete-cmake.pc" @ONLY)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/rete-cmake.pc"
DESTINATION lib/pkgconfig
RENAME rete-dev.pc
COMPONENT pkgconfig-cmake
)
# configure for debian package
set(RETE_INSTALL_PREFIX "/usr")
configure_file("rete.pc.in" "rete-pkgconfig.pc" @ONLY)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/rete-pkgconfig.pc"
DESTINATION lib/pkgconfig
RENAME rete.pc
COMPONENT pkgconfig-deb
)
# configure cpack
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "rete pattern matching and rule based reasoner")
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Nils Niemann <nils.niemann@dfki.de>")
set(CPACK_COMPONENTS_ALL "core;rdf;reasoner;pkgconfig-deb") # excludes the rete-dev.pc
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) # use dpkg-shlibdeps to find dependencies
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) # create shlibs control file automatically. Makes shlibdeps find this library as a dependency of others!
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libpegmatite (>= 0.1)")
# always last:
include(CPack)