Changeset 65f35e28ead51530840e0c4b488a8b219a019fe7

Show
Ignore:
Timestamp:
01/06/08 20:32:25 (4 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1212345145 +0200
git-parent:

[7d218020ad0516530bcd6a3b3c18998bdf024a1b]

git-author:
Rafaël Carré <funman@videolan.org> 1212345145 +0200
Message:

Fix various bugs / missing checks for cmake

Add ENABLE_NLS define, and make po files optional
Update source files to latest modifications
Add missing function checks
Define QT4LOCALEDIR
Require ncurses (I will submit a patch to cmake to check for ncursesw)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • extras/buildsystem/cmake/CMakeLists/root_CMakeLists.txt

    r025edf9 r65f35e2  
    3636add_subdirectory(src) 
    3737add_subdirectory(modules) 
    38 add_subdirectory(po) 
     38if(ENABLE_NLS) 
     39  add_subdirectory(po) 
     40endif(ENABLE_NLS) 
    3941add_subdirectory(test) 
    4042 
  • extras/buildsystem/cmake/CMakeLists/src_CMakeLists.txt

    r85f5092 r65f35e2  
    77 
    88# vlc 
    9 add_executable(vlc vlc.c) 
     9if(SYS_WIN32) 
     10  add_executable(vlc winvlc.c) 
     11else(SYS_WIN32) 
     12  add_executable(vlc vlc.c) 
     13endif(SYS_WIN32) 
    1014target_link_libraries(vlc libvlccore libvlc) 
    1115 
     
    2125set( SOURCES_libvlccore_common 
    2226    libvlc.c 
    23     libvlc-common.c 
    2427    libvlc.h 
    2528    libvlc-module.c 
     
    108111    config/configuration.h 
    109112    config/core.c 
     113    config/dirs.c 
    110114    config/chain.c 
    111115    config/file.c 
     
    126130    misc/xml.c 
    127131    misc/devices.c 
     132    version.c 
    128133    extras/libc.c 
    129134    ${CMAKE_BINARY_DIR}/include/vlc_about.h ) 
  • extras/buildsystem/cmake/config.h.cmake

    rfb12085 r65f35e2  
    287287#cmakedefine HAVE_UNSIGNED_LONG_LONG 
    288288#cmakedefine HAVE_UNSIGNED_LONG_LONG_INT 
     289#cmakedefine HAVE_USELOCALE 
    289290#cmakedefine HAVE_VASPRINTF 
    290291#cmakedefine HAVE_VA_COPY 
  • extras/buildsystem/cmake/include/config.cmake

    rbf52311 r65f35e2  
    2121OPTION( ENABLE_NO_SYMBOL_CHECK "Don't check symbols of modules against libvlc. (Enabling this option speeds up compilation)" OFF ) 
    2222OPTION( ENABLE_CONTRIB         "Attempt to use VLC contrib system to get the third-party libraries" ON ) 
    23 OPTION( ENABLE_LOADER          "Enable the win32 codec loader" ON ) 
     23OPTION( ENABLE_LOADER          "Enable the win32 codec loader" OFF ) 
     24OPTION( ENABLE_NLS             "Enable translation of the program's messages" ON) 
    2425 
    2526if(ENABLE_CONTRIB) 
     
    7273 
    7374set(PACKAGE "vlc") 
     75set(PACKAGE_NAME "vlc") #for gettext 
    7476set(PACKAGE_VERSION "${VLC_VERSION}") 
    7577set(PACKAGE_STRING "vlc") 
     
    135137set(CMAKE_REQUIRED_LIBRARIES c) 
    136138set(CMAKE_EXTRA_INCLUDE_FILES string.h) 
    137 vlc_check_functions_exist(strcpy strcasecmp
    138 vlc_check_functions_exist(strcasestr strdup) 
     139vlc_check_functions_exist(strcpy strcasecmp strncasecmp
     140vlc_check_functions_exist(strcasestr stristr strdup) 
    139141vlc_check_functions_exist(strndup stricmp strnicmp) 
    140142vlc_check_functions_exist(atof strtoll atoll lldiv) 
     
    176178set(CMAKE_EXTRA_INCLUDE_FILES sys/mman.h) 
    177179vlc_check_functions_exist(mmap) 
     180set(CMAKE_EXTRA_INCLUDE_FILES) 
     181 
     182set(CMAKE_EXTRA_INCLUDE_FILES locale.h) 
     183vlc_check_functions_exist(uselocale) 
    178184set(CMAKE_EXTRA_INCLUDE_FILES) 
    179185 
     
    504510  vlc_check_include_files (qt.h) 
    505511  vlc_enable_modules(qt4) 
    506   vlc_add_module_compile_flag(qt4 ${QT_CFLAGS} ) 
     512  #execute_process leaves the trailing newline appended to the variable, unlike exec_program 
     513  #execute_process( COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=prefix QtCore OUTPUT_VARIABLE QT4LOCALEDIR) 
     514  exec_program( ${PKG_CONFIG_EXECUTABLE} ARGS --variable=prefix QtCore OUTPUT_VARIABLE QT4LOCALEDIR) 
     515  set(QT4LOCALEDIR ${QT4LOCALEDIR}/share/qt4/translations ) 
     516  vlc_add_module_compile_flag(qt4 ${QT_CFLAGS}) 
     517  vlc_add_module_compile_flag(qt4 -DQT4LOCALEDIR=\\\\"${QT4LOCALEDIR}\\\\" ) 
    507518  vlc_module_add_link_libraries(qt4 ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) 
    508519 
     
    568579endif(Live555_FOUND) 
    569580 
     581set(CURSES_NEED_NCURSES TRUE) 
    570582find_package(Curses) 
    571583if(CURSES_LIBRARIES)