aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-15 22:56:10 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-15 22:56:10 -0700
commitf5e4186da2bc1c6d88582e8f2d4c6a236e278840 (patch)
tree2a522815ecc20c02f73741016bf0c607939950a9 /src
parentd5189738dbe73b691ba561bfa5b9ebb288896d80 (diff)
CMakefile: Detection of UUID, tidy and libxml2
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d90246c5..02e53494 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -17,6 +17,8 @@ IF(APPLE)
${CMAKE_CURRENT_SOURCE_DIR}/../Externals/ctemplate/include
${CMAKE_CURRENT_SOURCE_DIR}/../Externals/icu4c/include
${CMAKE_CURRENT_SOURCE_DIR}/../Externals/libetpan/include
+ /usr/include/tidy
+ /usr/include/libxml2
)
set(additional_lib_searchpath
@@ -81,6 +83,56 @@ else()
endif()
+# detect tidy
+
+find_path(TIDY_INCLUDE_DIR
+ NAMES tidy/tidy.h
+ PATHS ${additional_includes}
+)
+find_library(TIDY_LIBRARY
+ NAMES tidy
+ PATHS ${additional_lib_searchpath}
+)
+
+if(NOT TIDY_INCLUDE_DIR OR NOT TIDY_LIBRARY)
+ message(FATAL_ERROR "ERROR: Could not find tidy")
+else()
+ message(STATUS "Found tidy")
+endif()
+
+
+# detect uuid
+
+find_path(UUID_INCLUDE_DIR
+ NAMES uuid/uuid.h
+ PATHS ${additional_includes}
+)
+
+if(NOT UUID_INCLUDE_DIR)
+ message(FATAL_ERROR "ERROR: Could not find uuid")
+else()
+ message(STATUS "Found uuid")
+endif()
+
+
+# detect libxml2
+
+find_path(LIBXML_INCLUDE_DIR
+ NAMES libxml/xmlreader.h
+ PATHS ${additional_includes}
+)
+find_library(LIBXML_LIBRARY
+ NAMES xml2
+ PATHS ${additional_lib_searchpath}
+)
+
+if(NOT LIBXML_INCLUDE_DIR OR NOT LIBXML_LIBRARY)
+ message(FATAL_ERROR "ERROR: Could not find libxml2")
+else()
+ message(STATUS "Found libxml2")
+endif()
+
+
file(GLOB_RECURSE
source_files
*.h