Revision: 6878
http://playerstage.svn.sourceforge.net/playerstage/?rev=6878&view=rev
Author: gbiggs
Date: 2008-07-17 01:31:38 +0000 (Thu, 17 Jul 2008)
Log Message:
-----------
Fixed up finding libraries in non-standard locations
Modified Paths:
--------------
code/player/trunk/CMakeLists.txt
code/player/trunk/cmake/internal/SearchForStuff.cmake
Modified: code/player/trunk/CMakeLists.txt
===================================================================
--- code/player/trunk/CMakeLists.txt 2008-07-17 00:01:32 UTC (rev 6877)
+++ code/player/trunk/CMakeLists.txt 2008-07-17 01:31:38 UTC (rev 6878)
@@ -47,6 +47,9 @@
# Set some common include directories, including the binary dir to get config.h
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}
${PROJECT_BINARY_DIR}/libplayercore)
+# Extra directories where needed libraries, etc may be located (set by the
user)
+INCLUDE_DIRECTORIES (${PLAYER_EXTRA_INCLUDE_DIRS})
+LINK_DIRECTORIES (${PLAYER_EXTRA_LIB_DIRS})
# If on Windows, only build the client libraries. (this won't actually work
yet cause libplayerc needs some stuff from core)
ADD_SUBDIRECTORY (client_libs)
Modified: code/player/trunk/cmake/internal/SearchForStuff.cmake
===================================================================
--- code/player/trunk/cmake/internal/SearchForStuff.cmake 2008-07-17
00:01:32 UTC (rev 6877)
+++ code/player/trunk/cmake/internal/SearchForStuff.cmake 2008-07-17
01:31:38 UTC (rev 6878)
@@ -4,6 +4,12 @@
INCLUDE (CheckIncludeFiles)
INCLUDE (CheckLibraryExists)
+SET (PLAYER_EXTRA_LIB_DIRS "" CACHE STRING "List of extra library
directories.")
+MARK_AS_ADVANCED (PLAYER_EXTRA_LIB_DIRS)
+SET (PLAYER_EXTRA_INCLUDE_DIRS "" CACHE STRING "List of extra include
directories.")
+MARK_AS_ADVANCED (PLAYER_EXTRA_INCLUDE_DIRS)
+SET (CMAKE_REQUIRED_INCLUDES ${PLAYER_EXTRA_INCLUDE_DIRS})
+
IF (PLAYER_OS_QNX)
SET (CMAKE_REQUIRED_LIBRARIES socket)
ELSEIF (PLAYER_OS_SOLARIS)
@@ -32,24 +38,17 @@
CHECK_INCLUDE_FILES (strings.h HAVE_STRINGS_H)
CHECK_INCLUDE_FILES (dns_sd.h HAVE_DNS_SD)
IF (HAVE_DNS_SD)
- SET (DNS_SD_LOCATION "" CACHE STRING "Location where dns_sd is installed.")
- MARK_AS_ADVANCED (DNS_SD_LOCATION)
- CHECK_LIBRARY_EXISTS (dns_sd DNSServiceRefDeallocate "${DNS_SD_LOCATION}"
HAVE_DNS_SD)
+ CHECK_LIBRARY_EXISTS (dns_sd DNSServiceRefDeallocate
"${PLAYER_EXTRA_LIB_DIRS}" HAVE_DNS_SD)
ENDIF (HAVE_DNS_SD)
+CHECK_LIBRARY_EXISTS (ltdl lt_dlopenext "${PLAYER_EXTRA_LIB_DIRS}"
HAVE_LIBLTDL)
-SET (LIBLTDL_LOCATION "" CACHE STRING "Location where libltdl is installed.")
-MARK_AS_ADVANCED (LIBLTDL_LOCATION)
-CHECK_LIBRARY_EXISTS (ltdl lt_dlopenext "${LIBLTDL_LOCATION}" HAVE_LIBLTDL)
-
SET (CMAKE_REQUIRED_INCLUDES math.h)
SET (CMAKE_REQUIRED_LIBRARIES m)
CHECK_FUNCTION_EXISTS (round HAVE_ROUND)
SET (CMAKE_REQUIRED_INCLUDES)
SET (CMAKE_REQUIRED_LIBRARIES)
-SET (LIBJPEG_LOCATION "" CACHE STRING "Location where libjpeg is installed.")
-MARK_AS_ADVANCED (LIBJPEG_LOCATION)
-CHECK_LIBRARY_EXISTS (jpeg jpeg_read_header "${LIBJPEG_LOCATION}" HAVE_LIBJPEG)
+CHECK_LIBRARY_EXISTS (jpeg jpeg_read_header "${PLAYER_EXTRA_LIB_DIRS}"
HAVE_LIBJPEG)
CHECK_INCLUDE_FILES ("stdio.h;jpeglib.h" HAVE_JPEGLIB_H)
IF (HAVE_LIBJPEG AND HAVE_JPEGLIB_H)
SET (HAVE_JPEG TRUE)
@@ -61,17 +60,13 @@
SET (CMAKE_REQUIRED_INCLUDES)
SET (CMAKE_REQUIRED_LIBRARIES)
-SET (LIBZ_LOCATION "" CACHE STRING "Location where libz is installed.")
-MARK_AS_ADVANCED (LIBZ_LOCATION)
-CHECK_LIBRARY_EXISTS (z compress2 "${LIBZ_LOCATION}" HAVE_LIBZ)
+CHECK_LIBRARY_EXISTS (z compress2 "${PLAYER_EXTRA_LIB_DIRS}" HAVE_LIBZ)
CHECK_INCLUDE_FILES (zlib.h HAVE_ZLIB_H)
IF (HAVE_LIBZ AND HAVE_ZLIB_H)
SET (HAVE_Z TRUE)
ENDIF (HAVE_LIBZ AND HAVE_ZLIB_H)
-SET (LIBRT_LOCATION "" CACHE STRING "Location where librt is installed.")
-MARK_AS_ADVANCED (LIBRT_LOCATION)
-CHECK_LIBRARY_EXISTS (rt clock_gettime "${LIBRT_LOCATION}" HAVE_LIBRT)
+CHECK_LIBRARY_EXISTS (rt clock_gettime "${PLAYER_EXTRA_LIB_DIRS}" HAVE_LIBRT)
SET (CMAKE_REQUIRED_LIBRARIES rt)
CHECK_FUNCTION_EXISTS (clock_gettime HAVE_CLOCK_GETTIME_FUNC)
SET (CMAKE_REQUIRED_LIBRARIES)
@@ -134,3 +129,5 @@
FILE (WRITE ${testSTLSource}
"#include <string>\nint main () {std::string a = \"blag\"; return 0;}\n")
TRY_COMPILE (HAVE_STL ${CMAKE_CURRENT_BINARY_DIR} ${testSTLSource})
+
+SET (CMAKE_REQUIRED_INCLUDES)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit