forked from netmail-open/wjelement
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
59 lines (48 loc) · 1.78 KB
/
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
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
project(WJElement)
cmake_minimum_required(VERSION 2.6)
include(CheckIncludeFiles)
include(CheckSymbolExists)
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX /usr/local)
endif(NOT CMAKE_INSTALL_PREFIX)
set(INC_DEST_DIR ${CMAKE_INSTALL_PREFIX}/include)
set(LIB_DEST_DIR ${CMAKE_INSTALL_PREFIX}/lib)
set(BIN_DEST_DIR ${CMAKE_INSTALL_PREFIX}/bin)
if(CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions(-DDEBUG)
option(SHOWNOTES "Show preprocessor notes" OFF)
if(CMAKE_COMPILER_IS_GNUCC)
# GCC specific debug options
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g3 -ggdb3 -gdwarf-2")
set(AVOID_VERSION -avoid-version)
endif(CMAKE_COMPILER_IS_GNUCC)
endif(CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions(-DHAVE_CONFIG_H)
check_include_files(string.h HAVE_STRING_H)
check_symbol_exists(strcasecmp "strings.h" HAVE_STRCASECMP)
check_include_files(regex.h HAVE_REGEX_H)
if(HAVE_REGEX_H)
add_definitions(-DHAVE_REGEX_H)
else(HAVE_REGEX_H)
message("*** WARNING: GNU C regex library not found.")
message(" WJESchemaValidate() will not support patternProperties")
endif(HAVE_REGEX_H)
set(OPENSSL_LIBS ssl crypto)
set(PTHREAD_LIBS pthread)
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
# the RPATH to be used when installing
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
ENABLE_TESTING(1)
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/documentation/
DESTINATION doc/wjelement/
)
include_directories(include)
add_subdirectory(src)
add_subdirectory(include)