summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindAPR.cmake
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-03-24 02:27:47 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-03-26 11:43:54 -0500
commit621d9e5c413e561293d7484b93882d985b3fe15f (patch)
tree638f3d75761c121d9a8fb50b52a12a6686c5ac5c /cmake/Modules/FindAPR.cmake
parent40d3643b8d91886bf210aa27f711731c81a11e49 (diff)
downloadpki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.gz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.xz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.zip
Removed unnecessary pki folder.
Previously the source code was located inside a pki folder. This folder was created during svn migration and is no longer needed. This folder has now been removed and the contents have been moved up one level. Ticket #131
Diffstat (limited to 'cmake/Modules/FindAPR.cmake')
-rw-r--r--cmake/Modules/FindAPR.cmake67
1 files changed, 67 insertions, 0 deletions
diff --git a/cmake/Modules/FindAPR.cmake b/cmake/Modules/FindAPR.cmake
new file mode 100644
index 000000000..c61faa691
--- /dev/null
+++ b/cmake/Modules/FindAPR.cmake
@@ -0,0 +1,67 @@
+# - Try to find APR
+# Once done this will define
+#
+# APR_FOUND - system has APR
+# APR_INCLUDE_DIRS - the APR include directory
+# APR_LIBRARIES - Link these to use APR
+# APR_DEFINITIONS - Compiler switches required for using APR
+#
+# Copyright (c) 2010 Andreas Schneider <asn@redhat.com>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+
+if (APR_LIBRARIES AND APR_INCLUDE_DIRS)
+ # in cache already
+ set(APR_FOUND TRUE)
+else (APR_LIBRARIES AND APR_INCLUDE_DIRS)
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(_APR apr-1)
+ endif (PKG_CONFIG_FOUND)
+
+ find_path(APR_INCLUDE_DIR
+ NAMES
+ apr.h
+ PATHS
+ ${_APR_INCLUDEDIR}
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ PATH_SUFFIXES
+ apr-1
+ )
+
+ find_library(APR-1_LIBRARY
+ NAMES
+ apr-1
+ PATHS
+ ${_APR_LIBDIR}
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ set(APR_INCLUDE_DIRS
+ ${APR_INCLUDE_DIR}
+ )
+
+ if (APR-1_LIBRARY)
+ set(APR_LIBRARIES
+ ${APR_LIBRARIES}
+ ${APR-1_LIBRARY}
+ )
+ endif (APR-1_LIBRARY)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(APR DEFAULT_MSG APR_LIBRARIES APR_INCLUDE_DIRS)
+
+ # show the APR_INCLUDE_DIRS and APR_LIBRARIES variables only in the advanced view
+ mark_as_advanced(APR_INCLUDE_DIRS APR_LIBRARIES)
+
+endif (APR_LIBRARIES AND APR_INCLUDE_DIRS)