changeset 1335:4bed63189508

enhanced header lookup
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Mar 2015 15:40:38 +0200
parents 7f0aa3c0f659
children a80e811ec619
files Core/Uuid.cpp Resources/CMake/Compiler.cmake Resources/CMake/SQLiteConfiguration.cmake
diffstat 3 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Uuid.cpp	Mon Mar 30 15:28:19 2015 +0200
+++ b/Core/Uuid.cpp	Mon Mar 30 15:40:38 2015 +0200
@@ -40,7 +40,7 @@
 #ifdef WIN32
 #include <rpc.h>
 #else
-#include <uuid/uuid.h>
+#include <uuid.h>
 #endif
 }
 
--- a/Resources/CMake/Compiler.cmake	Mon Mar 30 15:28:19 2015 +0200
+++ b/Resources/CMake/Compiler.cmake	Mon Mar 30 15:40:38 2015 +0200
@@ -61,6 +61,13 @@
   set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
   link_libraries(uuid pthread rt dl)
 
+  find_path(LIBUUID_INCLUDE_DIR uuid.h
+    /usr/include
+    /usr/include/uuid
+    )
+  message("libuuid include dir: ${LIBUUID_INCLUDE_DIR}")
+  include_directories(${LIBUUID_INCLUDE_DIR})
+
 elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
   add_definitions(
     -DWINVER=0x0501
@@ -85,7 +92,7 @@
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
   CHECK_INCLUDE_FILES(rpc.h HAVE_UUID_H)
 else()
-  CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
+  CHECK_INCLUDE_FILES(uuid.h HAVE_UUID_H)
 endif()
 
 if (NOT HAVE_UUID_H)
--- a/Resources/CMake/SQLiteConfiguration.cmake	Mon Mar 30 15:28:19 2015 +0200
+++ b/Resources/CMake/SQLiteConfiguration.cmake	Mon Mar 30 15:40:38 2015 +0200
@@ -28,7 +28,10 @@
     message(FATAL_ERROR "Please install the libsqlite3-dev package")
   endif()
 
-  find_path(SQLITE_INCLUDE_DIR sqlite3.h)
+  find_path(SQLITE_INCLUDE_DIR sqlite3.h
+    /usr/include
+    /usr/local/include
+    )
   message("SQLite include dir: ${SQLITE_INCLUDE_DIR}")
 
   # Autodetection of the version of SQLite