cmake_minimum_required(VERSION 3.6)
set(CMAKE_CXX_STANDARD 98)
project(DarwinStreamingServer C CXX)

include_directories(APICommonCode
        APIModules/QTSSAccessLogModule
        APIModules/QTSSAccessModule
        APIModules/QTSSAdminModule
        APIModules/QTSSDemoAuthorizationModule.bproj
        APIModules/QTSSDemoRedirectModule.bproj
        APIModules/QTSSDemoSMILModule.bproj
        APIModules/QTSSDSAuthModule
        APIModules/QTSSDSAuthModule/DSWrappers
        APIModules/QTSSFileModule
        APIModules/QTSSFilePrivsModule.bproj
        APIModules/QTSSFlowControlModule
        APIModules/QTSSHomeDirectoryModule
        APIModules/QTSSHttpFileModule
        APIModules/QTSSMP3StreamingModule
        APIModules/QTSSPOSIXFileSysModule
        APIModules/QTSSProxyModule
        APIModules/QTSSRawFileModule.bproj
        APIModules/QTSSReflectorModule
        APIModules/QTSSRefMovieModule
        APIModules/QTSSRTPFileModule
        APIModules/QTSSSpamDefenseModule.bproj
        APIModules/QTSSWebDebugModule
        APIModules/QTSSWebStatsModule
        APIStubLib
        AtomicLib
        broadcasterctl
        CommonUtilitiesLib
        HTTPUtilitiesLib
        MP3Broadcaster
        PlaylistBroadcaster.tproj
        PrefsSourceLib
        QTFileLib
        QTFileTools/RTPFileGen.tproj
        RTCPUtilitiesLib
        RTPMetaInfoLib
        RTSPClientLib
        Server.tproj
        StreamingProxy.tproj)

add_definitions(-D_REENTRANT -D__USE_POSIX -D__linux__ -D__PTHREADS_MUTEXES__ -D__PTHREADS__)
#target_link_libraries(DarwinStreamingServer -lpthread -ldl -lstdc++ -lm -lcrypt)

set(DSS_SOURCE_FILES
        APICommonCode/QTAccessFile.cpp
        APICommonCode/QTSS3GPPModuleUtils.cpp
        APICommonCode/QTSSModuleUtils.cpp
        APICommonCode/QTSSRollingLog.cpp
        APICommonCode/SDPSourceInfo.cpp
        APICommonCode/SourceInfo.cpp
#        APIModules/OSMemory_Modules/OSMemory_Modules.cpp
        APIModules/QTSSAccessLogModule/QTSSAccessLogModule.cpp
        APIModules/QTSSAccessModule/AccessChecker.cpp
        APIModules/QTSSAccessModule/QTSSAccessModule.cpp
        APIModules/QTSSAdminModule/AdminElementNode.cpp
        APIModules/QTSSAdminModule/AdminQuery.cpp
        APIModules/QTSSAdminModule/QTSSAdminModule.cpp
        APIModules/QTSSDemoAuthorizationModule.bproj/QTSSDemoAuthorizationModule.cpp
        APIModules/QTSSDemoRedirectModule.bproj/QTSSDemoRedirectModule.cpp
        APIModules/QTSSDemoSMILModule.bproj/QTSSDemoSMILModule.cpp
# This module uses DirectoryServices, so could not compile on Linux
#        APIModules/QTSSDSAuthModule/DSWrappers/CDirService.cpp
#        APIModules/QTSSDSAuthModule/DSWrappers/DSBuffer.cpp
#        APIModules/QTSSDSAuthModule/DSAccessChecker.cpp
#        APIModules/QTSSDSAuthModule/QTSSDSAuthModule.cpp
        APIModules/QTSSFileModule/QTSSFileModule.cpp
        APIModules/QTSSFilePrivsModule.bproj/QTSSFilePrivsModule.cpp
        APIModules/QTSSFlowControlModule/QTSSFlowControlModule.cpp
        APIModules/QTSSHomeDirectoryModule/DirectoryInfo.cpp
        APIModules/QTSSHomeDirectoryModule/QTSSHomeDirectoryModule.cpp
        APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp
        APIModules/QTSSMP3StreamingModule/QTSSMP3StreamingModule.cpp
        APIModules/QTSSPOSIXFileSysModule/QTSSPosixFileSysModule.cpp
        APIModules/QTSSProxyModule/QTSSProxyModule.cpp
        APIModules/QTSSRawFileModule.bproj/QTSSRawFileModule.cpp
        APIModules/QTSSReflectorModule/QTSSReflectorModule.cpp
        APIModules/QTSSReflectorModule/QTSSRelayModule.cpp
#        APIModules/QTSSReflectorModule/QTSSSplitterModule.cpp
        APIModules/QTSSReflectorModule/RCFSourceInfo.cpp
        APIModules/QTSSReflectorModule/ReflectorSession.cpp
        APIModules/QTSSReflectorModule/ReflectorStream.cpp
        APIModules/QTSSReflectorModule/RelayOutput.cpp
        APIModules/QTSSReflectorModule/RelaySDPSourceInfo.cpp
        APIModules/QTSSReflectorModule/RelaySession.cpp
        APIModules/QTSSReflectorModule/RTPSessionOutput.cpp
        APIModules/QTSSReflectorModule/RTSPSourceInfo.cpp
        APIModules/QTSSReflectorModule/SequenceNumberMap.cpp
        APIModules/QTSSRefMovieModule/QTSSRefMovieModule.cpp
        APIModules/QTSSRTPFileModule/QTSSRTPFileModule.cpp
        APIModules/QTSSRTPFileModule/RTPFileSession.cpp
        APIModules/QTSSSpamDefenseModule.bproj/QTSSSpamDefenseModule.cpp
        APIModules/QTSSWebDebugModule/QTSSWebDebugModule.cpp
        APIModules/QTSSWebStatsModule/QTSSWebStatsModule.cpp
        APIStubLib/QTSS_Private.cpp
# Not sure what these are for
#        AtomicLib/hmi.c
#        AtomicLib/timescale.c
        CommonUtilitiesLib/atomic.cpp
        CommonUtilitiesLib/base64.c
        CommonUtilitiesLib/ConfParser.cpp
        CommonUtilitiesLib/daemon.c
        CommonUtilitiesLib/DateTranslator.cpp
        CommonUtilitiesLib/ev.cpp
        CommonUtilitiesLib/EventContext.cpp
        CommonUtilitiesLib/getopt.c
        CommonUtilitiesLib/GetWord.c
        CommonUtilitiesLib/IdleTask.cpp
        CommonUtilitiesLib/MakeDir.c
        CommonUtilitiesLib/md5.c
        CommonUtilitiesLib/md5digest.cpp
        CommonUtilitiesLib/MyAssert.cpp
# This relied on the Mach header file
#        CommonUtilitiesLib/mycondition.cpp
#        CommonUtilitiesLib/mymutex.cpp
        CommonUtilitiesLib/OS.cpp
        CommonUtilitiesLib/OSArrayObjectDeleter.h
        CommonUtilitiesLib/OSBufferPool.cpp
        CommonUtilitiesLib/OSCodeFragment.cpp
        CommonUtilitiesLib/OSCond.cpp
        CommonUtilitiesLib/OSFileSource.cpp
        CommonUtilitiesLib/OSHeaders.c
        CommonUtilitiesLib/OSHeap.cpp
        CommonUtilitiesLib/OSMutex.cpp
        CommonUtilitiesLib/OSMutexRW.cpp
        CommonUtilitiesLib/OSQueue.cpp
        CommonUtilitiesLib/OSRef.cpp
        CommonUtilitiesLib/OSThread.cpp
        CommonUtilitiesLib/QueryParamList.cpp
        CommonUtilitiesLib/ResizeableStringFormatter.cpp
        CommonUtilitiesLib/SDPUtils.cpp
        CommonUtilitiesLib/Socket.cpp
        CommonUtilitiesLib/SocketUtils.cpp
        CommonUtilitiesLib/StringFormatter.cpp
        CommonUtilitiesLib/StringParser.cpp
        CommonUtilitiesLib/StringTranslator.cpp
        CommonUtilitiesLib/StrPtrLen.cpp
        CommonUtilitiesLib/Task.cpp
        CommonUtilitiesLib/TCPListenerSocket.cpp
        CommonUtilitiesLib/TCPSocket.cpp
        CommonUtilitiesLib/TimeoutTask.cpp
        CommonUtilitiesLib/Trim.c
        CommonUtilitiesLib/UDPDemuxer.cpp
        CommonUtilitiesLib/UDPSocket.cpp
        CommonUtilitiesLib/UDPSocketPool.cpp
        CommonUtilitiesLib/UserAgentParser.cpp
# Uses Win32
#        CommonUtilitiesLib/win32ev.cpp
        HTTPUtilitiesLib/HTTPProtocol.cpp
        HTTPUtilitiesLib/HTTPRequest.cpp
        OSMemoryLib/OSMemory.cpp
        PrefsSourceLib/FilePrefsSource.cpp
# Uses NetInfo (which isn't even in OS X later than Tiger..)
#        PrefsSourceLib/NetInfoPrefsSource.cpp
#        PrefsSourceLib/nilib2.c
        PrefsSourceLib/XMLParser.cpp
        PrefsSourceLib/XMLPrefsParser.cpp
        QTFileLib/QTAtom.cpp
        QTFileLib/QTAtom_dref.cpp
        QTFileLib/QTAtom_elst.cpp
        QTFileLib/QTAtom_hinf.cpp
        QTFileLib/QTAtom_mdhd.cpp
        QTFileLib/QTAtom_mvhd.cpp
        QTFileLib/QTAtom_stco.cpp
        QTFileLib/QTAtom_stsc.cpp
        QTFileLib/QTAtom_stsd.cpp
        QTFileLib/QTAtom_stss.cpp
        QTFileLib/QTAtom_stsz.cpp
        QTFileLib/QTAtom_stts.cpp
        QTFileLib/QTAtom_tkhd.cpp
        QTFileLib/QTAtom_tref.cpp
        QTFileLib/QTFile.cpp
        QTFileLib/QTFile_FileControlBlock.cpp
        QTFileLib/QTHintTrack.cpp
        QTFileLib/QTRTPFile.cpp
        QTFileLib/QTTrack.cpp
        RTCPUtilitiesLib/RTCPAckPacket.cpp
        RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp
        RTCPUtilitiesLib/RTCPAPPPacket.cpp
        RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp
        RTCPUtilitiesLib/RTCPPacket.cpp
        RTCPUtilitiesLib/RTCPSRPacket.cpp
        RTPMetaInfoLib/RTPMetaInfoPacket.cpp
        RTSPClientLib/ClientSession.cpp
        RTSPClientLib/ClientSocket.cpp
        RTSPClientLib/RTSPClient.cpp
# Implements the same as InternalStdLib, but is for Dynamically loaded modules
#        SafeStdLib/DynamicModuleStdLib.cpp
        SafeStdLib/InternalStdLib.cpp
        Server.tproj/GenerateXMLPrefs.cpp
        Server.tproj/main.cpp
        Server.tproj/QTSSCallbacks.cpp
        Server.tproj/QTSSDataConverter.cpp
        Server.tproj/QTSSDictionary.cpp
        Server.tproj/QTSSErrorLogModule.cpp
        Server.tproj/QTSServer.cpp
        Server.tproj/QTSServerInterface.cpp
        Server.tproj/QTSServerPrefs.cpp
        Server.tproj/QTSSExpirationDate.cpp
        Server.tproj/QTSSFile.cpp
        Server.tproj/QTSSMessages.cpp
        Server.tproj/QTSSModule.cpp
        Server.tproj/QTSSPrefs.cpp
        Server.tproj/QTSSSocket.cpp
        Server.tproj/QTSSUserProfile.cpp
        Server.tproj/RTCPTask.cpp
        Server.tproj/RTPBandwidthTracker.cpp
        Server.tproj/RTPOverbufferWindow.cpp
        Server.tproj/RTPPacketResender.cpp
        Server.tproj/RTPSession.cpp
        Server.tproj/RTPSession3GPP.cpp
        Server.tproj/RTPSessionInterface.cpp
        Server.tproj/RTPStream.cpp
        Server.tproj/RTPStream3GPP.cpp
        Server.tproj/RTSPProtocol.cpp
        Server.tproj/RTSPRequest.cpp
        Server.tproj/RTSPRequest3GPP.cpp
        Server.tproj/RTSPRequestInterface.cpp
        Server.tproj/RTSPRequestStream.cpp
        Server.tproj/RTSPResponseStream.cpp
        Server.tproj/RTSPSession.cpp
        Server.tproj/RTSPSession3GPP.cpp
        Server.tproj/RTSPSessionInterface.cpp
        Server.tproj/RunServer.cpp)

add_executable(DarwinStreamingServer ${DSS_SOURCE_FILES})
target_link_libraries(DarwinStreamingServer pthread crypt dl m stdc++)

set(STREAMING_LOAD_TOOL_SOURCE_FILES
        APICommonCode/SDPSourceInfo.cpp
        APICommonCode/SourceInfo.cpp
        SafeStdLib/InternalStdLib.cpp
        CommonUtilitiesLib/atomic.cpp
        CommonUtilitiesLib/base64.c
        CommonUtilitiesLib/ConfParser.cpp
        CommonUtilitiesLib/ev.cpp
        CommonUtilitiesLib/EventContext.cpp
        CommonUtilitiesLib/GetWord.c
        CommonUtilitiesLib/IdleTask.cpp
        CommonUtilitiesLib/md5.c
        CommonUtilitiesLib/md5digest.cpp
        CommonUtilitiesLib/MyAssert.cpp
        CommonUtilitiesLib/OS.cpp
        CommonUtilitiesLib/OSCond.cpp
        CommonUtilitiesLib/OSHeap.cpp
        CommonUtilitiesLib/OSMutex.cpp
        CommonUtilitiesLib/OSMutexRW.cpp
        CommonUtilitiesLib/OSRef.cpp
        CommonUtilitiesLib/OSThread.cpp
        CommonUtilitiesLib/OSQueue.cpp
        CommonUtilitiesLib/ResizeableStringFormatter.cpp
        CommonUtilitiesLib/SDPUtils.cpp
        CommonUtilitiesLib/Socket.cpp
        CommonUtilitiesLib/SocketUtils.cpp
        CommonUtilitiesLib/StringFormatter.cpp
        CommonUtilitiesLib/StringParser.cpp
        CommonUtilitiesLib/StrPtrLen.cpp
        CommonUtilitiesLib/Task.cpp
        CommonUtilitiesLib/TCPSocket.cpp
        CommonUtilitiesLib/TimeoutTask.cpp
        CommonUtilitiesLib/Trim.c
        CommonUtilitiesLib/UDPSocket.cpp
        OSMemoryLib/OSMemory.cpp
        PrefsSourceLib/FilePrefsSource.cpp
        RTPMetaInfoLib/RTPMetaInfoPacket.cpp
        RTCPUtilitiesLib/RTCPPacket.cpp
        RTSPClientLib/ClientSession.cpp
        RTSPClientLib/ClientSocket.cpp
        RTSPClientLib/RTSPClient.cpp
        StreamingLoadTool/StreamingLoadTool.cpp)

add_executable(StreamingLoadTool ${STREAMING_LOAD_TOOL_SOURCE_FILES})
target_link_libraries(StreamingLoadTool pthread)

set(QTATOM_SOURCE_FILES
        QTFileLib/QTAtom.cpp
        QTFileLib/QTAtom_dref.cpp
        QTFileLib/QTAtom_elst.cpp
        QTFileLib/QTAtom_hinf.cpp
        QTFileLib/QTAtom_mdhd.cpp
        QTFileLib/QTAtom_mvhd.cpp
        QTFileLib/QTAtom_stco.cpp
        QTFileLib/QTAtom_stsc.cpp
        QTFileLib/QTAtom_stsd.cpp
        QTFileLib/QTAtom_stss.cpp
        QTFileLib/QTAtom_stsz.cpp
        QTFileLib/QTAtom_stts.cpp
        QTFileLib/QTAtom_tkhd.cpp
        QTFileLib/QTAtom_tref.cpp)

set(PLAYLIST_BROADCASTER_SOURCE_FILES
        APICommonCode/SDPSourceInfo.cpp
        APICommonCode/SourceInfo.cpp
        APICommonCode/QTSSRollingLog.cpp
        SafeStdLib/InternalStdLib.cpp
        CommonUtilitiesLib/atomic.cpp
        CommonUtilitiesLib/base64.c
        CommonUtilitiesLib/ConfParser.cpp
        CommonUtilitiesLib/DateTranslator.cpp
        CommonUtilitiesLib/ev.cpp
        CommonUtilitiesLib/EventContext.cpp
        CommonUtilitiesLib/GetWord.c
        CommonUtilitiesLib/IdleTask.cpp
        CommonUtilitiesLib/md5.c
        CommonUtilitiesLib/md5digest.cpp
        CommonUtilitiesLib/MyAssert.cpp
        CommonUtilitiesLib/OS.cpp
        CommonUtilitiesLib/OSCond.cpp
        CommonUtilitiesLib/OSFileSource.cpp
        CommonUtilitiesLib/OSHeap.cpp
        CommonUtilitiesLib/OSMutex.cpp
        CommonUtilitiesLib/OSMutexRW.cpp
        CommonUtilitiesLib/OSQueue.cpp
        CommonUtilitiesLib/OSRef.cpp
        CommonUtilitiesLib/OSThread.cpp
        CommonUtilitiesLib/SDPUtils.cpp
        CommonUtilitiesLib/ResizeableStringFormatter.cpp
        CommonUtilitiesLib/StringFormatter.cpp
        CommonUtilitiesLib/StringParser.cpp
        CommonUtilitiesLib/StringTranslator.cpp
        CommonUtilitiesLib/StrPtrLen.cpp
        CommonUtilitiesLib/Socket.cpp
        CommonUtilitiesLib/SocketUtils.cpp
        CommonUtilitiesLib/Task.cpp
        CommonUtilitiesLib/TimeoutTask.cpp
        CommonUtilitiesLib/TCPSocket.cpp
        CommonUtilitiesLib/Trim.c
        CommonUtilitiesLib/UDPSocket.cpp
        OSMemoryLib/OSMemory.cpp
        ${QTATOM_SOURCE_FILES}
        QTFileLib/QTFile.cpp
        QTFileLib/QTFile_FileControlBlock.cpp
        QTFileLib/QTHintTrack.cpp
        QTFileLib/QTRTPFile.cpp
        QTFileLib/QTTrack.cpp
        RTPMetaInfoLib/RTPMetaInfoPacket.cpp
        RTSPClientLib/ClientSocket.cpp
        RTSPClientLib/RTSPClient.cpp
        PlaylistBroadcaster.tproj/BCasterTracker.cpp
        PlaylistBroadcaster.tproj/BroadcasterSession.cpp
        PlaylistBroadcaster.tproj/BroadcastLog.cpp
        PlaylistBroadcaster.tproj/GetLocalIPAddressString.c
        PlaylistBroadcaster.tproj/NoRepeat.cpp
        PlaylistBroadcaster.tproj/notes.c
        PlaylistBroadcaster.tproj/PickerFromFile.cpp
        PlaylistBroadcaster.tproj/playlist_broadcaster.cpp
        PlaylistBroadcaster.tproj/playlist_elements.cpp
        PlaylistBroadcaster.tproj/playlist_lists.cpp
        PlaylistBroadcaster.tproj/playlist_parsers.cpp
        PlaylistBroadcaster.tproj/playlist_QTRTPBroadcastFile.cpp
        PlaylistBroadcaster.tproj/playlist_SDPGen.cpp
        PlaylistBroadcaster.tproj/playlist_SimpleParse.cpp
        PlaylistBroadcaster.tproj/playlist_utils.cpp
        PlaylistBroadcaster.tproj/PlaylistBroadcaster.cpp
        PlaylistBroadcaster.tproj/PlaylistPicker.cpp
        PlaylistBroadcaster.tproj/PLBroadcastDef.cpp)

add_executable(PlaylistBroadcaster ${PLAYLIST_BROADCASTER_SOURCE_FILES})
target_link_libraries(PlaylistBroadcaster pthread)

set(MP3_BROADCASTER_SOURCE_FILES
        APICommonCode/QTSSRollingLog.cpp
        SafeStdLib/InternalStdLib.cpp
        CommonUtilitiesLib/atomic.cpp
        CommonUtilitiesLib/ConfParser.cpp
        CommonUtilitiesLib/ev.cpp
        CommonUtilitiesLib/EventContext.cpp
        CommonUtilitiesLib/GetWord.c
        CommonUtilitiesLib/MyAssert.cpp
        CommonUtilitiesLib/OS.cpp
        CommonUtilitiesLib/OSCond.cpp
        CommonUtilitiesLib/OSFileSource.cpp
        CommonUtilitiesLib/OSHeap.cpp
        CommonUtilitiesLib/OSMutex.cpp
        CommonUtilitiesLib/OSMutexRW.cpp
        CommonUtilitiesLib/OSQueue.cpp
        CommonUtilitiesLib/OSRef.cpp
        CommonUtilitiesLib/OSThread.cpp
        CommonUtilitiesLib/ResizeableStringFormatter.cpp
        CommonUtilitiesLib/Socket.cpp
        CommonUtilitiesLib/SocketUtils.cpp
        CommonUtilitiesLib/StringFormatter.cpp
        CommonUtilitiesLib/StringParser.cpp
        CommonUtilitiesLib/StringTranslator.cpp
        CommonUtilitiesLib/StrPtrLen.cpp
        CommonUtilitiesLib/Task.cpp
        CommonUtilitiesLib/TCPSocket.cpp
        CommonUtilitiesLib/Trim.c
        OSMemoryLib/OSMemory.cpp
        PlaylistBroadcaster.tproj/NoRepeat.cpp
        PlaylistBroadcaster.tproj/PickerFromFile.cpp
        PlaylistBroadcaster.tproj/PlaylistPicker.cpp
        MP3Broadcaster/BroadcasterMain.cpp
        MP3Broadcaster/MP3Broadcaster.cpp
        MP3Broadcaster/MP3Broadcaster.h
        MP3Broadcaster/MP3BroadcasterLog.cpp
        MP3Broadcaster/MP3BroadcasterLog.h
        MP3Broadcaster/MP3FileBroadcaster.cpp
        MP3Broadcaster/MP3FileBroadcaster.h
        MP3Broadcaster/MP3MetaInfoUpdater.cpp
        MP3Broadcaster/MP3MetaInfoUpdater.h)

add_executable(MP3Broadcaster ${MP3_BROADCASTER_SOURCE_FILES})
target_link_libraries(MP3Broadcaster pthread)

set(QTFILELIB_COMMON_SOURCE_FILES
        SafeStdLib/InternalStdLib.cpp
        CommonUtilitiesLib/DateTranslator.cpp
        CommonUtilitiesLib/MyAssert.cpp
        CommonUtilitiesLib/OS.cpp
        CommonUtilitiesLib/OSCond.cpp
        CommonUtilitiesLib/OSFileSource.cpp
        CommonUtilitiesLib/OSMutex.cpp
        CommonUtilitiesLib/OSQueue.cpp
        CommonUtilitiesLib/StringParser.cpp
        CommonUtilitiesLib/StrPtrLen.cpp
        RTPMetaInfoLib/RTPMetaInfoPacket.cpp
        ${QTATOM_SOURCE_FILES}
        QTFileLib/QTFile.cpp
        QTFileLib/QTHintTrack.cpp
        QTFileLib/QTTrack.cpp
        QTFileLib/QTFile_FileControlBlock.cpp)

add_executable(QTBroadcaster ${QTFILELIB_COMMON_SOURCE_FILES}
        QTFileLib/QTRTPFile.cpp
        QTFileTools/QTBroadcaster.tproj/QTBroadcaster.cpp)
target_link_libraries(QTBroadcaster pthread)

add_executable(QTFileInfo ${QTFILELIB_COMMON_SOURCE_FILES} QTFileTools/QTFileInfo.tproj/QTFileInfo.cpp)
target_link_libraries(QTFileInfo pthread)

add_executable(QTFileTest ${QTFILELIB_COMMON_SOURCE_FILES} QTFileTools/QTFileTest.tproj/QTFileTest.cpp)
target_link_libraries(QTFileTest pthread)

add_executable(QTRTPFileTest ${QTFILELIB_COMMON_SOURCE_FILES}
        QTFileLib/QTRTPFile.cpp
        QTFileTools/QTRTPFileTest.tproj/QTRTPFileTest.cpp)
target_link_libraries(QTRTPFileTest pthread)

add_executable(QTRTPGen ${QTFILELIB_COMMON_SOURCE_FILES}
        QTFileLib/QTRTPFile.cpp
        QTFileTools/QTRTPGen.tproj/QTRTPGen.cpp)
target_link_libraries(QTRTPGen pthread)

add_executable(QTSampleLister ${QTFILELIB_COMMON_SOURCE_FILES}
        QTFileTools/QTSampleLister.tproj/QTSampleLister.cpp)
target_link_libraries(QTSampleLister pthread)

add_executable(QTSDPGen ${QTFILELIB_COMMON_SOURCE_FILES}
        QTFileLib/QTRTPFile.cpp
        QTFileTools/QTSDPGen.tproj/QTSDPGen.cpp)
target_link_libraries(QTSDPGen pthread)

add_executable(QTTrackInfo ${QTFILELIB_COMMON_SOURCE_FILES}
        QTFileTools/QTTrackInfo.tproj/QTTrackInfo.cpp)
target_link_libraries(QTTrackInfo pthread)

add_executable(RTPFileGen ${QTFILELIB_COMMON_SOURCE_FILES}
        QTFileLib/QTRTPFile.cpp
        QTFileTools/RTPFileGen.tproj/RTPFileGen.cpp)
target_link_libraries(RTPFileGen pthread)

add_executable(qtpasswd
        SafeStdLib/InternalStdLib.cpp
        CommonUtilitiesLib/md5.c
        CommonUtilitiesLib/md5digest.cpp
        CommonUtilitiesLib/OS.cpp
        CommonUtilitiesLib/OSMutex.cpp
        CommonUtilitiesLib/MyAssert.cpp
        CommonUtilitiesLib/StringParser.cpp
        CommonUtilitiesLib/StrPtrLen.cpp
        qtpasswd.tproj/QTSSPasswd.cpp)
target_link_libraries(qtpasswd pthread crypt)

add_executable(StreamingProxy
        StreamingProxy.tproj/get_opt.c
        StreamingProxy.tproj/proxy.c
        StreamingProxy.tproj/proxy_unix.c
        StreamingProxy.tproj/shared_udp.c
        StreamingProxy.tproj/util.c)