[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r3473: If MARBLE_LIBRARY_DIR isn't set but MARBLEWIDGET_LIBRARY is (vidalia/branches/marble/cmake)



Author: edmanm
Date: 2009-01-25 22:43:32 -0500 (Sun, 25 Jan 2009)
New Revision: 3473

Modified:
   vidalia/branches/marble/cmake/FindMarble.cmake
Log:

If MARBLE_LIBRARY_DIR isn't set but MARBLEWIDGET_LIBRARY is found, derive the
former from the latter.


Modified: vidalia/branches/marble/cmake/FindMarble.cmake
===================================================================
--- vidalia/branches/marble/cmake/FindMarble.cmake	2009-01-26 03:31:55 UTC (rev 3472)
+++ vidalia/branches/marble/cmake/FindMarble.cmake	2009-01-26 03:43:32 UTC (rev 3473)
@@ -53,15 +53,17 @@
 
 
 message(STATUS "Looking for Marble libraries")
-find_library(MARBLE_LIBRARIES
+find_library(MARBLEWIDGET_LIBRARY
   NAMES marblewidget
   PATHS ${MARBLE_LIBRARY_DIR}
 )
-if (MARBLE_LIBRARY_DIR)
+if (MARBLEWIDGET_LIBRARY)
   message(STATUS "Looking for Marble libraries - found")
-else(MARBLE_LIBRARY_DIR)
+  set(MARBLE_LIBRARIES ${MARBLEWIDGET_LIBRARY})
+  get_filename_component(MARBLE_LIBRARY_DIR ${MARBLEWIDGET_LIBRARY} PATH)
+else(MARBLEWIDGET_LIBRARY)
   message(FATAL_ERROR "Could not find Marble libraries. If Marble is installed, you can run CMake again and specify its location with -DMARBLE_LIBRARY_DIR=<path>")
-endif(MARBLE_LIBRARY_DIR)
+endif(MARBLEWIDGET_LIBRARY)
 
 
 if (APPLE OR WIN32)