-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
55 lines (42 loc) · 1.46 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
cmake_minimum_required(VERSION 2.8.3)
set(CMAKE_FIND_DEBUG_MODE TRUE)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
function(println)
message("==============================")
endfunction(println)
function(debug PREFIX)
set(SUFFIXES "FOUND" "VERSION" "VERSION_MAJOR" "VERSION_MINOR" "VERSION_PATCH" "LIBRARY" "LIBRARIES" "INCLUDE_DIR" "INCLUDE_DIRS")
# list(APPEND SUFFIXES "FIND_VERSION" "FIND_VERSION_EXACT" "FIND_COMPONENTS" "FIND_REQUIRED" "FIND_QUIETLY")
if(MSVC)
list(APPEND SUFFIXES "LIBRARY_RELEASE" "LIBRARY_DEBUG")
endif(MSVC)
foreach(SUFFIX ${SUFFIXES})
if(DEFINED ${PREFIX}_${SUFFIX})
message("${PREFIX}_${SUFFIX} = ${${PREFIX}_${SUFFIX}}")
else(DEFINED ${PREFIX}_${SUFFIX})
message("${PREFIX}_${SUFFIX} = <UNDEFINED>")
endif(DEFINED ${PREFIX}_${SUFFIX})
endforeach(SUFFIX)
println()
endfunction(debug)
include(CommonFind)
find_package(XXX QUIET)
debug("XXX")
find_package(MySQL #[[5.5 REQUIRED]])
debug("MySQL")
find_package(PCRE QUIET)
debug("PCRE")
find_package(Editline QUIET)
debug("Editline")
find_package(SQLite3 QUIET)
debug("SQLite3")
find_package(Hiredis QUIET)
debug("Hiredis")
find_package(libMemcached QUIET)
debug("libMemcached")
get_cmake_property(PACKAGES_FOUND PACKAGES_FOUND)
message("PACKAGES_FOUND = ${PACKAGES_FOUND}")
get_cmake_property(PACKAGES_NOT_FOUND PACKAGES_NOT_FOUND)
message("PACKAGES_NOT_FOUND = ${PACKAGES_NOT_FOUND}")
println()
add_subdirectory(test)