Hi all, attached please find CMakeLists.txt configuration file for live555. It works on Linux, it is not tested on anything else yet. I'd like to know if it is acceptable to use cmake - if yes, then I will extend it for other platforms. It is not intended to replace original makefiles.
Please let me know what do you think about it. How to use it: Copy CMakeLists.txt file into directory where live sources are (the same which contains genMakefiles), referenced as <path-to-live-source-dir> below . If you would like to build in the same directory as sources are, then type: cd <path-to-live-source-dir> cmake . make If you would like to build in other directory (so called "out of source build"), for example in /tmp/live , then type: mkdir /tmp/live cd /tmp/live cmake <path-to-live-source-dir> make If you will use "out of source build", then your source directory stays intact, it could even be read-only. I use it this way because then source directory easily could be shared between several machines. Best Regards David Stegbauer This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
project (live555 C CXX) cmake_minimum_required (VERSION 2.8.0) option (BUILD_MEDIA_SERVER "Build live555MediaServer binary in addition to libraries" ON) option (BUILD_TEST_PROGS "Build test programs in addition to libraries" ON) set ( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} ) if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") add_definitions (-DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64) # Install Directories if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") set (_libdir_suffix "64" ) endif () endif () #SET( CMAKE_VERBOSE_MAKEFILE ON ) #if ( WIN32 ) #add_subdirectory (WindowsAudioInputDevice) #endif ( WIN32 ) #add_subdirectory (common) #add_subdirectory (UsageEnvironment) #add_subdirectory (groupsock) #add_subdirectory (liveMedia) #add_subdirectory (BasicUsageEnvironment) #add_subdirectory (testProgs) #add_subdirectory (mediaServer) file (GLOB UsageEnvironment_SRCS RELATIVE ${CMAKE_SOURCE_DIR} "UsageEnvironment/*.cpp") file (GLOB groupsock_SRCS RELATIVE ${CMAKE_SOURCE_DIR} "groupsock/*.cpp" "groupsock/*.c") file (GLOB liveMedia_SRCS RELATIVE ${CMAKE_SOURCE_DIR} "liveMedia/*.cpp" "liveMedia/*.c") file (GLOB BasicUsageEnvironment_SRCS RELATIVE ${CMAKE_SOURCE_DIR} "BasicUsageEnvironment/*.cpp") file (GLOB mediaServer_SRCS RELATIVE ${CMAKE_SOURCE_DIR} "mediaServer/*.cpp") include_directories ( common/include groupsock/include UsageEnvironment/include liveMedia liveMedia/include BasicUsageEnvironment/include ) if (BUILD_SHARED_LIBS) # note: libs ordering is important add_library (live555 ${liveMedia_SRCS} ${groupsock_SRCS} ${BasicUsageEnvironment_SRCS} ${UsageEnvironment_SRCS}) install (TARGETS live555 LIBRARY DESTINATION "lib${_libdir_suffix}") set (live555_LIBS live555) else () add_library (UsageEnvironment STATIC ${UsageEnvironment_SRCS}) add_library (groupsock STATIC ${groupsock_SRCS}) add_library (liveMedia STATIC ${liveMedia_SRCS}) add_library (BasicUsageEnvironment STATIC ${BasicUsageEnvironment_SRCS}) set (live555_LIBS liveMedia groupsock BasicUsageEnvironment UsageEnvironment) endif () # RPATH handling # use, i.e. don't skip the full RPATH for the build tree SET(CMAKE_SKIP_BUILD_RPATH FALSE) # when building, don't use the install RPATH already # (but later on when installing) SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) # the RPATH to be used when installing SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${_libdir_suffix}") # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # media server if (BUILD_MEDIA_SERVER) include_directories (mediaServer) add_executable (live555MediaServer ${mediaServer_SRCS}) target_link_libraries (live555MediaServer ${live555_LIBS}) install (TARGETS live555MediaServer RUNTIME DESTINATION bin) endif () # test programs if (BUILD_TEST_PROGS) include_directories (testProgs) set (PROGS testMP3Streamer testMPEG1or2VideoStreamer testMPEG1or2AudioVideoStreamer testMPEG2TransportStreamer testMPEG4VideoStreamer testDVVideoStreamer testWAVAudioStreamer testAMRAudioStreamer vobStreamer testMP3Receiver testMPEG1or2VideoReceiver sapWatch testRelay testOnDemandRTSPServer testMPEG1or2AudioVideoToDarwin testMPEG4VideoToDarwin openRTSP playSIP testMPEG1or2Splitter testMPEG1or2ProgramToTransportStream MPEG2TransportStreamIndexer testMPEG2TransportStreamTrickPlay ) # MULTICAST_STREAMER_APPS set (testMP3Streamer_SRCS testProgs/testMP3Streamer.cpp) set (testMPEG1or2VideoStreamer_SRCS testProgs/testMPEG1or2VideoStreamer.cpp) set (testMPEG1or2AudioVideoStreamer_SRCS testProgs/testMPEG1or2AudioVideoStreamer.cpp) set (testMPEG2TransportStreamer_SRCS testProgs/testMPEG2TransportStreamer.cpp) set (testMPEG4VideoStreamer_SRCS testProgs/testMPEG4VideoStreamer.cpp) set (testDVVideoStreamer_SRCS testProgs/testDVVideoStreamer.cpp) set (testWAVAudioStreamer_SRCS testProgs/testWAVAudioStreamer.cpp) set (testAMRAudioStreamer_SRCS testProgs/testAMRAudioStreamer.cpp) set (vobStreamer_SRCS testProgs/vobStreamer.cpp) # MULTICAST_RECEIVER_APPS set (testMP3Receiver_SRCS testProgs/testMP3Receiver.cpp) set (testMPEG1or2VideoReceiver_SRCS testProgs/testMPEG1or2VideoReceiver.cpp) set (sapWatch_SRCS testProgs/sapWatch.cpp) # MULTICAST_MISC_APPS set (testRelay_SRCS testProgs/testRelay.cpp) # UNICAST_STREAMER_APPS set (testOnDemandRTSPServer_SRCS testProgs/testOnDemandRTSPServer.cpp) set (testMPEG1or2AudioVideoToDarwin_SRCS testProgs/testMPEG1or2AudioVideoToDarwin.cpp) set (testMPEG4VideoToDarwin_SRCS testProgs/testMPEG4VideoToDarwin.cpp) # UNICAST_RECEIVER_APPS set (openRTSP_SRCS testProgs/openRTSP.cpp testProgs/playCommon.cpp) set (playSIP_SRCS testProgs/playSIP.cpp testProgs/playCommon.cpp) # MISC_APPS set (testMPEG1or2Splitter_SRCS testProgs/testMPEG1or2Splitter.cpp) set (testMPEG1or2ProgramToTransportStream_SRCS testProgs/testMPEG1or2ProgramToTransportStream.cpp) set (MPEG2TransportStreamIndexer_SRCS testProgs/MPEG2TransportStreamIndexer.cpp) set (testMPEG2TransportStreamTrickPlay_SRCS testProgs/testMPEG2TransportStreamTrickPlay.cpp) # EXTRA APPS set (GSM_STREAMER_SRCS testProgs/testGSMStreamer.cpp testProgs/testGSMEncoder.cpp) foreach (_bin ${PROGS}) add_executable (${_bin} ${${_bin}_SRCS}) target_link_libraries (${_bin} ${live555_LIBS}) endforeach () install (TARGETS ${PROGS} RUNTIME DESTINATION bin) endif ()
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel