]> git.sesse.net Git - vlc/commitdiff
cmake:
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 5 Feb 2008 00:18:01 +0000 (00:18 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 5 Feb 2008 00:18:01 +0000 (00:18 +0000)
* Don't use dyld functions on darwin by default as they are deprecated.
* Defines HAVE_DYNAMIC_MODULES, and add an entry in the options for it.
* Fix config.h generation (was accidentaly removed).
* Fix FindDlopen.cmake
This produce a working in tree vlc AND an installable vlc at the same time.

extras/buildsystem/cmake/config.h.cmake
extras/buildsystem/cmake/include/FindDlopen.cmake
extras/buildsystem/cmake/include/config.cmake

index 0f58594bc9c08575bbd59937e9a08383dab48b26..1665974aac8e773ec7ee56434f360997c8775369 100644 (file)
 #cmakedefine HAVE___VA_COPY
 #cmakedefine ICONV_CONST ${ICONV_CONST}
 #cmakedefine INTDIV0_RAISES_SIGFPE
-#cmakedefine LIBEXT
+#cmakedefine LIBEXT "${LIBEXT}"
 #cmakedefine NDEBUG
 #cmakedefine NO_MINUS_C_MINUS_O
 #cmakedefine NTOHL_IN_SYS_PARAM_H
 #cmakedefine glthread_once_call            libintl_once_call
 #cmakedefine glthread_once_singlethreaded  libintl_once_singlethreaded
 #include <vlc_fixups.h>
-#endif
\ No newline at end of file
+#endif
+
index 1b99b2ba364ec592b0c09df891208c93fc640db8..689e64d51b5ea39cd5d790e9af3250842e7a311d 100644 (file)
@@ -9,12 +9,11 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 
 
-# Assume dlopen is not found.
-if (Dlopen_SEARCHED)
+if (NOT Dlopen_SEARCHED)
     include(CheckLibraryExists)
 
-    set(Dlopen_SEARCHED TRUE)
-    set(Dlopen_FOUND FALSE)
+    set(Dlopen_SEARCHED TRUE CACHE INTERNAL "")
+    set(Dlopen_FOUND FALSE CACHE INTERNAL "")
 
     foreach (library c c_r dl)
       if (NOT Dlopen_FOUND)
@@ -22,7 +21,7 @@ if (Dlopen_SEARCHED)
 
         if (Dlopen_IN_${library})
           set(Dlopen_LIBRARIES ${library} CACHE STRING "Library containing dlopen")
-          set(Dlopen_FOUND TRUE)
+          set(Dlopen_FOUND TRUE CACHE INTERNAL "")
         endif (Dlopen_IN_${library})
 
       endif (NOT Dlopen_FOUND)
@@ -39,4 +38,4 @@ if (Dlopen_SEARCHED)
     endif (Dlopen_FOUND)
 
     mark_as_advanced(Dlopen_LIBRARIES)
-endif(Dlopen_SEARCHED)
\ No newline at end of file
+endif(NOT Dlopen_SEARCHED)
index 801fc39b9bdcbdeeb4a4e0b1b545093d4f2a8a28..fc889f66e3e9494ba11d1026e6d5de4456fb4246 100644 (file)
@@ -107,7 +107,6 @@ if(APPLE)
         set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
             "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -undefined dynamic_lookup")
 
-    set(HAVE_DL_DYLD ON INTERNAL)
     set(SYS_DARWIN 1)
 
     vlc_enable_modules(macosx minimal_macosx access_eyetv quartztext)
@@ -181,8 +180,12 @@ set(COPYRIGHT_YEARS "2001-2007")
 # Options
 ###########################################################
 
-OPTION( ENABLE_HTTPD "Enable httpd server" ON )
-OPTION( ENABLE_VLM   "Enable vlm" ON )
+OPTION( ENABLE_HTTPD           "Enable httpd server" ON )
+OPTION( ENABLE_VLM             "Enable vlm" ON )
+OPTION( ENABLE_DYNAMIC_PLUGINS "Enable dynamic plugin" ON )
+
+set( HAVE_DYNAMIC_PLUGINS ${ENABLE_DYNAMIC_PLUGINS})
+set( LIBEXT ${CMAKE_SHARED_MODULE_SUFFIX})
 
 ###########################################################
 # Modules: Following are all listed in options
@@ -249,3 +252,5 @@ set(HAVE_DL_DLOPEN ${Dlopen_FOUND})
 ###########################################################
 # Final configuration
 ###########################################################
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/config.h)
+