Changeset 95932c1566de36c6fbcee2ee1f4db6d5a476a2b0
- Timestamp:
- 02/25/08 23:15:52 (7 months ago)
- git-parent:
- Files:
-
- extras/buildsystem/cmake/include/config.cmake (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
extras/buildsystem/cmake/include/config.cmake
r260a183 r95932c1 1 ########################################################### 2 # System Includes 3 ########################################################### 1 4 include( CheckIncludeFile ) 2 5 include (CheckTypeSize) … … 5 8 include (CheckLibraryExists) 6 9 10 ########################################################### 11 # Options 12 ########################################################### 13 # Options moved before the custom macro includes because those macros need path values, if the ENABLE_CONTRIB 14 # has been set. 15 16 OPTION( ENABLE_HTTPD "Enable httpd server" ON ) 17 OPTION( ENABLE_VLM "Enable vlm" ON ) 18 OPTION( ENABLE_DYNAMIC_PLUGINS "Enable dynamic plugin" ON ) 19 OPTION( UPDATE_CHECK "Enable automatic new version checking" OFF ) 20 OPTION( ENABLE_NO_SYMBOL_CHECK "Don't check symbols of modules against libvlc. (Enabling this option speeds up compilation)" OFF ) 21 OPTION( ENABLE_CONTRIB "Attempt to use VLC contrib system to get the third-party libraries" ON ) 22 23 if(ENABLE_CONTRIB) 24 25 set( CONTRIB_INCLUDE ${CMAKE_SOURCE_DIR}/extras/contrib/include) 26 set( CONTRIB_LIB ${CMAKE_SOURCE_DIR}/extras/contrib/lib) 27 set( CONTRIB_PROGRAM ${CMAKE_SOURCE_DIR}/extras/contrib/bin) 28 set( CMAKE_LIBRARY_PATH ${CONTRIB_LIB} ${CMAKE_LIBRARY_PATH} ) 29 set( CMAKE_PROGRAM_PATH ${CONTRIB_PROGRAM} ${CMAKE_PROGRAM_PATH} ) 30 set( CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${CONTRIB_LIB}" ) 31 set( CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${CONTRIB_LIB}" ) 32 set( CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -L${CONTRIB_LIB}" ) 33 set( CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS} -L${CONTRIB_LIB}" ) 34 set( CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -L${CONTRIB_LIB}" ) 35 set( CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -L${CONTRIB_LIB}" ) 36 37 # include extras/contrib/include in the header search pathes 38 include_directories(${CONTRIB_INCLUDE}) 39 set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${CONTRIB_INCLUDE} ) 40 41 # include the extras/contrib/bin to the search path, otherwise, when finding programs it will automatically 42 # default to system applications (e.g. we should favor the extras/contrib/bin/pkg-config over the system defined 43 # one). 44 if(WIN32) 45 set( ENV{PATH} "${CONTRIB_PROGRAM};$ENV{PATH}" ) 46 else(WIN32) 47 set( ENV{PATH} "${CONTRIB_PROGRAM}:$ENV{PATH}" ) 48 endif(WIN32) 49 endif(ENABLE_CONTRIB) 50 51 ########################################################### 52 # Custom Macro Includes 53 ########################################################### 54 7 55 include( ${CMAKE_SOURCE_DIR}/cmake/vlc_check_include_files.cmake ) 8 56 include( ${CMAKE_SOURCE_DIR}/cmake/vlc_check_functions_exist.cmake ) … … 12 60 13 61 ########################################################### 14 # V ERSION62 # Versioning 15 63 ########################################################### 16 64 … … 33 81 34 82 ########################################################### 35 # Options 36 ########################################################### 37 38 OPTION( ENABLE_HTTPD "Enable httpd server" ON ) 39 OPTION( ENABLE_VLM "Enable vlm" ON ) 40 OPTION( ENABLE_DYNAMIC_PLUGINS "Enable dynamic plugin" ON ) 41 OPTION( UPDATE_CHECK "Enable automatic new version checking" OFF ) 42 OPTION( ENABLE_NO_SYMBOL_CHECK "Don't check symbols of modules against libvlc. (Enabling this option speeds up compilation)" OFF ) 83 # Preflight Checks 84 ########################################################### 43 85 44 86 IF (NOT CMAKE_BUILD_TYPE) … … 84 126 # Functions/structures checks 85 127 ########################################################### 128 86 129 set(CMAKE_REQUIRED_LIBRARIES c) 87 130 set(CMAKE_EXTRA_INCLUDE_FILES string.h) … … 202 245 # Other check 203 246 ########################################################### 247 204 248 include( ${CMAKE_SOURCE_DIR}/cmake/vlc_test_inline.cmake ) 205 249 … … 207 251 # Platform check 208 252 ########################################################### 253 209 254 if(APPLE) 210 255 include( ${CMAKE_SOURCE_DIR}/cmake/vlc_find_frameworks.cmake ) … … 320 365 set( VLC_COMPILER "${CMAKE_C_COMPILER}" ) 321 366 322 323 367 ########################################################### 324 368 # Modules: Following are all listed in options … … 370 414 # libraries 371 415 ########################################################### 372 OPTION( ENABLE_CONTRIB "Attempt to use VLC contrib system to get the third-party libraries" ON ) 373 if(ENABLE_CONTRIB) 374 set( CONTRIB_INCLUDE ${CMAKE_SOURCE_DIR}/extras/contrib/include) 375 set( CONTRIB_LIB ${CMAKE_SOURCE_DIR}/extras/contrib/lib) 376 set( CONTRIB_PROGRAM ${CMAKE_SOURCE_DIR}/extras/contrib/bin) 377 set( CMAKE_LIBRARY_PATH ${CONTRIB_LIB} ${CMAKE_LIBRARY_PATH} ) 378 set( CMAKE_PROGRAM_PATH ${CONTRIB_PROGRAM} ${CMAKE_PROGRAM_PATH} ) 379 set( CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${CONTRIB_LIB}" ) 380 set( CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${CONTRIB_LIB}" ) 381 set( CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -L${CONTRIB_LIB}" ) 382 set( CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS} -L${CONTRIB_LIB}" ) 383 set( CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -L${CONTRIB_LIB}" ) 384 set( CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -L${CONTRIB_LIB}" ) 385 add_definitions(-I${CONTRIB_INCLUDE}) 386 endif(ENABLE_CONTRIB) 387 388 set(CMAKE_REQUIRED_INCLUDES ${CONTRIB_INCLUDE}) 416 417 include_directories(${CONTRIB_INCLUDE}) 389 418 390 419 #fixme: use find_package(cddb 0.9.5) … … 418 447 find_package(FFmpeg) 419 448 if(FFmpeg_FOUND) 449 set( CMAKE_REQUIRED_FLAGS_saved ${CMAKE_REQUIRED_FLAGS} ) 450 set( CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${FFmpeg_CFLAGS}" ) 451 452 #set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${CONTRIB_INCLUDE}/ffmpeg ) 453 420 454 vlc_check_include_files (ffmpeg/avcodec.h) 421 455 vlc_check_include_files (ffmpeg/avutil.h) … … 425 459 vlc_add_module_compile_flag(ffmpeg ${FFmpeg_CFLAGS} ) 426 460 vlc_module_add_link_libraries(ffmpeg ${FFmpeg_LIBRARIES}) 461 462 set( CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_saved} ) 463 set( CMAKE_REQUIRED_FLAGS_saved ) 427 464 endif(FFmpeg_FOUND) 428 465 … … 530 567 if(Dvbpsi_FOUND) 531 568 vlc_enable_modules(ts) 532 set(CMAKE_REQUIRED_INCLUDES ${CONTRIB_INCLUDE})533 569 check_include_files ("stdint.h;dvbpsi/dvbpsi.h;dvbpsi/demux.h;dvbpsi/descriptor.h;dvbpsi/pat.h;dvbpsi/pmt.h;dvbpsi/sdt.h;dvbpsi/dr.h" HAVE_DVBPSI_DR_H) 534 570 vlc_module_add_link_libraries(ts ${Dvbpsi_LIBRARIES}) 535 571 endif(Dvbpsi_FOUND) 536 572 537 538 539 573 set(CMAKE_REQUIRED_INCLUDES) 540 574 … … 542 576 # Final configuration 543 577 ########################################################### 578 544 579 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/config.h)
