[mlpack-svn] r11666 - mlpack/trunk

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Feb 29 17:06:32 EST 2012


Author: rcurtin
Date: 2012-02-29 17:06:31 -0500 (Wed, 29 Feb 2012)
New Revision: 11666

Modified:
   mlpack/trunk/CMakeLists.txt
Log:
Hey, so, it turns out when you find the package, you've gotta add the include
directories too.


Modified: mlpack/trunk/CMakeLists.txt
===================================================================
--- mlpack/trunk/CMakeLists.txt	2012-02-29 21:30:31 UTC (rev 11665)
+++ mlpack/trunk/CMakeLists.txt	2012-02-29 22:06:31 UTC (rev 11666)
@@ -13,6 +13,13 @@
 find_package(Armadillo 2.4.0 REQUIRED)
 find_package(LibXml2 REQUIRED)
 
+# Include directories for the previous dependencies.
+include_directories(${PTHREADS_INCLUDE_DIR})
+include_directories(${ARMADILLO_INCLUDE_DIRS})
+
+# Pthreads may have a compiler definition.
+add_definitions(${PTHREADS_DEFINITIONS})
+
 # libxml2 requires some special handling
 find_package(PkgConfig)
 
@@ -26,8 +33,8 @@
 find_library(LIBXML2_LIBRARY NAMES xml2 libxml2
              HINTS ${PC_LIBXML_LIBDIR} ${PC_LIBXML_LIBRARY_DIRS} )
 
-set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} )
-set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR} )
+set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY})
+set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR})
 
 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE
@@ -35,8 +42,10 @@
 find_package_handle_standard_args(LibXml2  DEFAULT_MSG
                                   LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
 
-mark_as_advanced(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARY )
+mark_as_advanced(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARY)
 
+include_directories(${LIBXML2_INCLUDE_DIR})
+
 # Unfortunately this configuration variable is necessary and will need to be
 # updated as time goes on and new versions are released.
 set(Boost_ADDITIONAL_VERSIONS
@@ -48,6 +57,7 @@
   program_options
   unit_test_framework
   REQUIRED) # May require math_tr1?
+include_directories(${Boost_INCLUDE_DIRS})
 
 # We need to include Boost random, but only if newer than 1.45 (as of 1.46 it
 # became a separate package with its own linkable library object).
@@ -56,6 +66,8 @@
   random
   REQUIRED)
   set(BOOST_LIBS ${BOOST_LIBS} "boost_random")
+  # This may be redundant.
+  include_directories(${Boost_INCLUDE_DIRS})
 endif(Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION GREATER 45)
 
 # Default to debugging mode for developers.




More information about the mlpack-svn mailing list