Browse code

- Simplified CMake files for building libraries and plugins. - Ability to override installation directories.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1509 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Peter Lemenkov authored on 08/10/2009 14:39:02
Showing 52 changed files
... ...
@@ -28,26 +28,29 @@ OPTION(SEMS_USE_MONITORING    "Build with monitoring support" OFF)
28 28
 OPTION(SEMS_USE_IPV6          "Build with IPv6 support" OFF)
29 29
 OPTION(MAX_RTP_SESSIONS:int   "How many rtp sessions SEMS will handle simultaneously? (default 2048)" 2048)
30 30
 
31
-OPTION(SEMS_CFG_PREFIX:string  "none" /usr/local)
32
-OPTION(SEMS_AUDIO_PREFIX:string "none" /usr/local)
33
-OPTION(SEMS_EXEC_PREFIX:string "none" /usr/local)
34
-OPTION(SEMS_LIBDIR:string "none" lib)
31
+
32
+# add -lm and -lpthread to all targets
33
+SET(CMAKE_DL_LIBS ${CMAKE_DL_LIBS} m pthread)
35 34
 
36 35
 IF (NOT SEMS_CFG_PREFIX)
37 36
 	SET(SEMS_CFG_PREFIX "/usr/local")
38 37
 ENDIF (NOT SEMS_CFG_PREFIX)
38
+MESSAGE(STATUS "SEMS cfg prefix was set to: ${SEMS_CFG_PREFIX}")
39 39
 
40 40
 IF (NOT SEMS_AUDIO_PREFIX)
41
-	SET(SEMS_AUDIO_PREFIX "/usr/local")
41
+	SET(SEMS_AUDIO_PREFIX "/usr/local/lib")
42 42
 ENDIF (NOT SEMS_AUDIO_PREFIX)
43
+MESSAGE(STATUS "SEMS audio prefix was set to: ${SEMS_AUDIO_PREFIX}")
43 44
 
44 45
 IF (NOT SEMS_EXEC_PREFIX)
45 46
 	SET(SEMS_EXEC_PREFIX "/usr/local")
46 47
 ENDIF (NOT SEMS_EXEC_PREFIX)
48
+MESSAGE(STATUS "SEMS exec prefix was set to: ${SEMS_EXEC_PREFIX}")
47 49
 
48 50
 IF (NOT SEMS_LIBDIR)
49 51
 	SET(SEMS_LIBDIR "lib")
50 52
 ENDIF (NOT SEMS_LIBDIR)
53
+MESSAGE(STATUS "SEMS libdir was set to: ${SEMS_LIBDIR}")
51 54
 
52 55
 SET(CMAKE_VERBOSE_MAKEFILE ON)
53 56
 
... ...
@@ -149,10 +152,10 @@ ENDIF (GSM_INCLUDE_DIR AND GSM_LIBRARIES)
149 149
 
150 150
 # Let's try to find SPEEX library and header files
151 151
 FIND_LIBRARY(SPEEX_LIBRARIES NAMES speex)
152
-FIND_PATH(SPEEX_INCLUDE_DIR speex.h)
152
+FIND_PATH(SPEEX_INCLUDE_DIR speex/speex.h)
153 153
 IF(SPEEX_INCLUDE_DIR AND SPEEX_LIBRARIES)
154 154
 	SET(SPEEX_FOUND TRUE)
155
-	MESSAGE(STATUS "Found speex includes: ${SPEEX_INCLUDE_DIR}/speex.h")
155
+	MESSAGE(STATUS "Found speex includes: ${SPEEX_INCLUDE_DIR}/speex/speex.h")
156 156
 	MESSAGE(STATUS "Found speex library: ${SPEEX_LIBRARIES}")
157 157
 	MESSAGE(STATUS "Using speex: YES")
158 158
 ELSE(SPEEX_INCLUDE_DIR AND SPEEX_LIBRARIES)
... ...
@@ -3,6 +3,5 @@ AnnounceB2B.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(ann_b2b SHARED ${ann_b2b_SRCS})
6
-SET_TARGET_PROPERTIES(ann_b2b PROPERTIES OUTPUT_NAME "ann_b2b")
7
-TARGET_LINK_LIBRARIES(ann_b2b ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(ann_b2b ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -3,6 +3,5 @@ AnnounceTransfer.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(announce_transfer SHARED ${announce_transfer_SRCS})
6
-SET_TARGET_PROPERTIES(announce_transfer PROPERTIES OUTPUT_NAME "announce_transfer")
7
-TARGET_LINK_LIBRARIES(announce_transfer ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(announce_transfer ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -3,6 +3,5 @@ Announcement.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(announcement SHARED ${announcement_SRCS})
6
-SET_TARGET_PROPERTIES(announcement PROPERTIES OUTPUT_NAME "announcement")
7
-TARGET_LINK_LIBRARIES(announcement ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(announcement ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -3,6 +3,5 @@ AnnRecorder.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(annrecorder SHARED ${annrecorder_SRCS})
6
-SET_TARGET_PROPERTIES(annrecorder PROPERTIES OUTPUT_NAME "annrecorder")
7
-TARGET_LINK_LIBRARIES(annrecorder ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(annrecorder ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -5,6 +5,5 @@ AuthB2B.cpp
5 5
 ADD_DEFINITIONS(-DMOD_NAME="auth_b2b")
6 6
 
7 7
 ADD_LIBRARY(auth_b2b SHARED ${auth_b2b_SRCS})
8
-SET_TARGET_PROPERTIES(auth_b2b PROPERTIES OUTPUT_NAME "auth_b2b")
9
-TARGET_LINK_LIBRARIES(auth_b2b ${CMAKE_DL_LIBS} pthread m)
8
+TARGET_LINK_LIBRARIES(auth_b2b ${CMAKE_DL_LIBS})
10 9
 
... ...
@@ -5,6 +5,5 @@ CallTimer.cpp
5 5
 ADD_DEFINITIONS(-DMOD_NAME="call_timer")
6 6
 
7 7
 ADD_LIBRARY(call_timer SHARED ${call_timer_SRCS})
8
-SET_TARGET_PROPERTIES(call_timer PROPERTIES OUTPUT_NAME "call_timer")
9
-TARGET_LINK_LIBRARIES(call_timer ${CMAKE_DL_LIBS} pthread m)
8
+TARGET_LINK_LIBRARIES(call_timer ${CMAKE_DL_LIBS})
10 9
 
... ...
@@ -5,6 +5,5 @@ CallBack.cpp
5 5
 ADD_DEFINITIONS(-DMOD_NAME="callback")
6 6
 
7 7
 ADD_LIBRARY(callback SHARED ${callback_SRCS})
8
-SET_TARGET_PROPERTIES(callback PROPERTIES OUTPUT_NAME "callback")
9
-TARGET_LINK_LIBRARIES(callback ${CMAKE_DL_LIBS} pthread m)
8
+TARGET_LINK_LIBRARIES(callback ${CMAKE_DL_LIBS})
10 9
 
... ...
@@ -3,6 +3,5 @@ Click2Dial.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(click2dial SHARED ${click2dial_SRCS})
6
-SET_TARGET_PROPERTIES(click2dial PROPERTIES OUTPUT_NAME "click2dial")
7
-TARGET_LINK_LIBRARIES(click2dial ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(click2dial ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -3,8 +3,7 @@ Conference.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(conference SHARED ${conference_SRCS})
6
-SET_TARGET_PROPERTIES(conference PROPERTIES OUTPUT_NAME "conference")
7
-TARGET_LINK_LIBRARIES(conference ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(conference ${CMAKE_DL_LIBS})
8 7
 
9 8
 IF(FLITE_FOUND AND ZRTP_FOUND)
10 9
 	INCLUDE_DIRECTORIES(${FLITE_INCLUDE_DIR}/flite)
... ...
@@ -9,8 +9,7 @@ INCLUDE_DIRECTORIES (lib_dbase)
9 9
 SET_PROPERTY(TARGET libdbase PROPERTY IMPORTED_LOCATION ./lib_dbase/libdbase.a)
10 10
 
11 11
 ADD_LIBRARY(diameter_client SHARED ${diameter_client_SRCS})
12
-SET_TARGET_PROPERTIES(diameter_client PROPERTIES OUTPUT_NAME "diameter_client")
13
-TARGET_LINK_LIBRARIES(diameter_client ${CMAKE_DL_LIBS} pthread m libdbase)
12
+TARGET_LINK_LIBRARIES(diameter_client ${CMAKE_DL_LIBS} libdbase)
14 13
 
15 14
 IF(OPENSSL_FOUND)
16 15
 	ADD_DEFINITIONS(-DWITH_OPENSSL)
... ...
@@ -4,13 +4,10 @@ diameter_msg.c
4 4
 tcp_comm.c
5 5
 )
6 6
 
7
-SET(CMAKE_VERBOSE_MAKEFILE ON)
8
-
9 7
 IF(OPENSSL_FOUND)
10 8
 	ADD_DEFINITIONS(-DWITH_OPENSSL)
11 9
 ENDIF(OPENSSL_FOUND)
12 10
 
13 11
 add_library(libdbase STATIC ${libdbase_SRCS})
14
-set_target_properties(libdbase PROPERTIES OUTPUT_NAME "libdbase")
15
-target_link_libraries(libdbase ${CMAKE_DL_LIBS} pthread m)
12
+target_link_libraries(libdbase ${CMAKE_DL_LIBS})
16 13
 
... ...
@@ -15,6 +15,5 @@ INCLUDE_DIRECTORIES (.)
15 15
 ADD_SUBDIRECTORY (mods)
16 16
 
17 17
 ADD_LIBRARY(dsm SHARED ${dsm_SRCS})
18
-SET_TARGET_PROPERTIES(dsm PROPERTIES OUTPUT_NAME "dsm")
19
-TARGET_LINK_LIBRARIES(dsm ${CMAKE_DL_LIBS} pthread m)
18
+TARGET_LINK_LIBRARIES(dsm ${CMAKE_DL_LIBS})
20 19
 
... ...
@@ -3,6 +3,5 @@ ModAws.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(mod_aws SHARED ${mod_aws_SRCS})
6
-SET_TARGET_PROPERTIES(mod_aws PROPERTIES OUTPUT_NAME "mod_aws")
7 6
 TARGET_LINK_LIBRARIES(mod_aws ${CMAKE_DL_LIBS} aws)
8 7
 
... ...
@@ -3,6 +3,5 @@ ModConference.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(mod_conference SHARED ${mod_conference_SRCS})
6
-SET_TARGET_PROPERTIES(mod_conference PROPERTIES OUTPUT_NAME "mod_conference")
7
-TARGET_LINK_LIBRARIES(mod_conference ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(mod_conference ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -3,6 +3,5 @@ ModDlg.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(mod_dlg SHARED ${mod_dlg_SRCS})
6
-SET_TARGET_PROPERTIES(mod_dlg PROPERTIES OUTPUT_NAME "mod_dlg")
7
-TARGET_LINK_LIBRARIES(mod_dlg ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(mod_dlg ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -3,6 +3,5 @@ ModMonitoring.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(mod_monitoring SHARED ${mod_monitoring_SRCS})
6
-SET_TARGET_PROPERTIES(mod_monitoring PROPERTIES OUTPUT_NAME "mod_monitoring")
7
-TARGET_LINK_LIBRARIES(mod_monitoring ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(mod_monitoring ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -6,6 +6,5 @@ INCLUDE_DIRECTORIES(/usr/include/mysql)
6 6
 INCLUDE_DIRECTORIES(${MYSQLPP_INCLUDE_DIR}/mysql++)
7 7
 
8 8
 ADD_LIBRARY(mod_mysql SHARED ${mod_mysql_SRCS})
9
-SET_TARGET_PROPERTIES(mod_mysql PROPERTIES OUTPUT_NAME "mod_mysql")
10
-TARGET_LINK_LIBRARIES(mod_mysql ${CMAKE_DL_LIBS} pthread m mysqlpp)
9
+TARGET_LINK_LIBRARIES(mod_mysql ${CMAKE_DL_LIBS} mysqlpp)
11 10
 
... ...
@@ -3,6 +3,5 @@ ModSys.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(mod_sys SHARED ${mod_sys_SRCS})
6
-SET_TARGET_PROPERTIES(mod_sys PROPERTIES OUTPUT_NAME "mod_sys")
7
-TARGET_LINK_LIBRARIES(mod_sys ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(mod_sys ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -3,6 +3,5 @@ ModUri.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(mod_uri SHARED ${mod_uri_SRCS})
6
-SET_TARGET_PROPERTIES(mod_uri PROPERTIES OUTPUT_NAME "mod_uri")
7
-TARGET_LINK_LIBRARIES(mod_uri ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(mod_uri ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -3,6 +3,5 @@ ModUtils.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(mod_utils SHARED ${mod_utils_SRCS})
6
-SET_TARGET_PROPERTIES(mod_utils PROPERTIES OUTPUT_NAME "mod_utils")
7
-TARGET_LINK_LIBRARIES(mod_utils ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(mod_utils ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -3,8 +3,7 @@ EarlyAnnounce.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(early_announce SHARED ${early_announce_SRCS})
6
-SET_TARGET_PROPERTIES(early_announce PROPERTIES OUTPUT_NAME "early_announce")
7
-TARGET_LINK_LIBRARIES(early_announce ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(early_announce ${CMAKE_DL_LIBS})
8 7
 
9 8
 IF(MYSQLPP_FOUND)
10 9
 	INCLUDE_DIRECTORIES(/usr/include/mysql)
... ...
@@ -10,6 +10,5 @@ ADD_DEFINITIONS(-DGW_VERSION="0.1")
10 10
 INCLUDE_DIRECTORIES(${MISDN_INCLUDE_DIR}/mISDNuser)
11 11
 
12 12
 ADD_LIBRARY(gateway SHARED ${gateway_SRCS})
13
-SET_TARGET_PROPERTIES(gateway PROPERTIES OUTPUT_NAME "gateway")
14
-TARGET_LINK_LIBRARIES(gateway ${CMAKE_DL_LIBS} pthread m mISDN isdnnet)
13
+TARGET_LINK_LIBRARIES(gateway ${CMAKE_DL_LIBS} mISDN isdnnet)
15 14
 
... ...
@@ -12,8 +12,7 @@ IvrUAC.cpp
12 12
 INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
13 13
 
14 14
 ADD_LIBRARY(ivr SHARED ${ivr_SRCS})
15
-SET_TARGET_PROPERTIES(ivr PROPERTIES OUTPUT_NAME "ivr")
16
-TARGET_LINK_LIBRARIES(ivr ${CMAKE_DL_LIBS} pthread m)
15
+TARGET_LINK_LIBRARIES(ivr ${CMAKE_DL_LIBS})
17 16
 
18 17
 IF(FLITE_FOUND)
19 18
 	INCLUDE_DIRECTORIES(${FLITE_INCLUDE_DIR}/flite)
... ...
@@ -5,6 +5,5 @@ Monitoring.cpp
5 5
 ADD_DEFINITIONS(-DMOD_NAME="monitoring")
6 6
 
7 7
 ADD_LIBRARY(monitoring SHARED ${monitoring_SRCS})
8
-SET_TARGET_PROPERTIES(monitoring PROPERTIES OUTPUT_NAME "monitoring")
9
-TARGET_LINK_LIBRARIES(monitoring ${CMAKE_DL_LIBS} pthread m)
8
+TARGET_LINK_LIBRARIES(monitoring ${CMAKE_DL_LIBS})
10 9
 
... ...
@@ -7,6 +7,5 @@ mp3.c
7 7
 #	module_cflags += -DWITH_MPG123DECODER
8 8
 
9 9
 ADD_LIBRARY(mp3 SHARED ${mp3_SRCS})
10
-SET_TARGET_PROPERTIES(mp3 PROPERTIES OUTPUT_NAME "mp3")
11
-TARGET_LINK_LIBRARIES(mp3 ${CMAKE_DL_LIBS} pthread m mp3lame)
10
+TARGET_LINK_LIBRARIES(mp3 ${CMAKE_DL_LIBS} mp3lame)
12 11
 
... ...
@@ -9,6 +9,5 @@ MsgStorage.cpp
9 9
 ADD_DEFINITIONS(-DMOD_NAME="msg_storage")
10 10
 
11 11
 ADD_LIBRARY(msg_storage SHARED ${msg_storage_SRCS})
12
-SET_TARGET_PROPERTIES(msg_storage PROPERTIES OUTPUT_NAME "msg_storage")
13
-TARGET_LINK_LIBRARIES(msg_storage ${CMAKE_DL_LIBS} pthread m)
12
+TARGET_LINK_LIBRARIES(msg_storage ${CMAKE_DL_LIBS})
14 13
 
... ...
@@ -5,6 +5,5 @@ PrecodedAnnounce.cpp
5 5
 ADD_DEFINITIONS(-DMOD_NAME="precoded_announce")
6 6
 
7 7
 ADD_LIBRARY(precoded_announce SHARED ${precoded_announce_SRCS})
8
-SET_TARGET_PROPERTIES(precoded_announce PROPERTIES OUTPUT_NAME "precoded_announce")
9
-TARGET_LINK_LIBRARIES(precoded_announce ${CMAKE_DL_LIBS} pthread m)
8
+TARGET_LINK_LIBRARIES(precoded_announce ${CMAKE_DL_LIBS})
10 9
 
... ...
@@ -3,6 +3,5 @@ RegistrationAgent.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(reg_agent SHARED ${reg_agent_SRCS})
6
-SET_TARGET_PROPERTIES(reg_agent PROPERTIES OUTPUT_NAME "reg_agent")
7
-TARGET_LINK_LIBRARIES(reg_agent ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(reg_agent ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -4,6 +4,5 @@ SIPRegistrarClient.cpp
4 4
 )
5 5
 
6 6
 ADD_LIBRARY(registrar_client SHARED ${registrar_client_SRCS})
7
-SET_TARGET_PROPERTIES(registrar_client PROPERTIES OUTPUT_NAME "registrar_client")
8
-TARGET_LINK_LIBRARIES(registrar_client ${CMAKE_DL_LIBS} pthread m)
7
+TARGET_LINK_LIBRARIES(registrar_client ${CMAKE_DL_LIBS})
9 8
 
... ...
@@ -3,6 +3,5 @@ SWPrepaidSIP.cpp
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(sw_prepaid_sip SHARED ${sw_prepaid_sip_SRCS})
6
-SET_TARGET_PROPERTIES(sw_prepaid_sip PROPERTIES OUTPUT_NAME "sw_prepaid_sip")
7
-TARGET_LINK_LIBRARIES(sw_prepaid_sip ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(sw_prepaid_sip ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -4,6 +4,5 @@ VoiceboxDialog.cpp
4 4
 )
5 5
 
6 6
 ADD_LIBRARY(voicebox SHARED ${voicebox_SRCS})
7
-SET_TARGET_PROPERTIES(voicebox PROPERTIES OUTPUT_NAME "voicebox")
8
-TARGET_LINK_LIBRARIES(voicebox ${CMAKE_DL_LIBS} pthread m)
7
+TARGET_LINK_LIBRARIES(voicebox ${CMAKE_DL_LIBS})
9 8
 
... ...
@@ -6,8 +6,7 @@ EmailTemplate.cpp
6 6
 )
7 7
 
8 8
 ADD_LIBRARY(voicemail SHARED ${voicemail_SRCS})
9
-SET_TARGET_PROPERTIES(voicemail PROPERTIES OUTPUT_NAME "voicemail")
10
-TARGET_LINK_LIBRARIES(voicemail ${CMAKE_DL_LIBS} pthread m)
9
+TARGET_LINK_LIBRARIES(voicemail ${CMAKE_DL_LIBS})
11 10
 
12 11
 # Currently cannot be build with mysql++
13 12
 #IF(MYSQLPP_FOUND)
... ...
@@ -6,6 +6,5 @@ WebConferenceDialog.cpp
6 6
 )
7 7
 
8 8
 ADD_LIBRARY(webconference SHARED ${webconference_SRCS})
9
-SET_TARGET_PROPERTIES(webconference PROPERTIES OUTPUT_NAME "webconference")
10
-TARGET_LINK_LIBRARIES(webconference ${CMAKE_DL_LIBS} pthread m)
9
+TARGET_LINK_LIBRARIES(webconference ${CMAKE_DL_LIBS})
11 10
 
... ...
@@ -11,8 +11,7 @@ INCLUDE_DIRECTORIES (xmlrpc++/src)
11 11
 SET_PROPERTY(TARGET xmlrpcpp PROPERTY IMPORTED_LOCATION ./xmlrpc++/src/xmlrpcpp.a)
12 12
 
13 13
 ADD_LIBRARY(xmlrpc2di SHARED ${xmlrpc2di_SRCS})
14
-SET_TARGET_PROPERTIES(xmlrpc2di PROPERTIES OUTPUT_NAME "xmlrpc2di")
15
-TARGET_LINK_LIBRARIES(xmlrpc2di ${CMAKE_DL_LIBS} pthread m xmlrpcpp)
14
+TARGET_LINK_LIBRARIES(xmlrpc2di ${CMAKE_DL_LIBS} xmlrpcpp)
16 15
 
17 16
 IF(OPENSSL_FOUND)
18 17
 	ADD_DEFINITIONS(-DHAVE_XMLRPCPP_SSL -DXMLRPCPP_SUPPORT_STRUCT_ACCESS)
... ...
@@ -13,14 +13,11 @@ XmlRpcUtil.cpp
13 13
 XmlRpcValue.cpp
14 14
 )
15 15
 
16
-SET(CMAKE_VERBOSE_MAKEFILE ON)
17
-
18 16
 # Add your system-dependent network libs here. These are
19 17
 # only used to build the tests (your application will need them too).
20 18
 # Linux: none
21 19
 # Solaris: -lsocket -lnsl
22 20
 
23
-add_library(xmlrpcpp STATIC ${xmlrpcpp_SRCS})
24
-set_target_properties(xmlrpcpp PROPERTIES OUTPUT_NAME "xmlrpcpp")
25
-target_link_libraries(xmlrpcpp ${CMAKE_DL_LIBS} pthread m)
21
+ADD_LIBRARY(xmlrpcpp STATIC ${xmlrpcpp_SRCS})
22
+TARGET_LINK_LIBRARIES(xmlrpcpp ${CMAKE_DL_LIBS})
26 23
 
... ...
@@ -52,7 +52,7 @@ INCLUDE_DIRECTORIES (ampi)
52 52
 INCLUDE_DIRECTORIES (amci)
53 53
 
54 54
 ADD_EXECUTABLE (sems ${sems_SRCS})
55
-TARGET_LINK_LIBRARIES(sems ${CMAKE_DL_LIBS} pthread stdc++ m)
55
+TARGET_LINK_LIBRARIES(sems ${CMAKE_DL_LIBS} stdc++)
56 56
 
57 57
 IF(NOT MAX_RTP_SESSIONS)
58 58
 	SET(MAX_RTP_SESSIONS 2048)
... ...
@@ -8,6 +8,5 @@ g72x.c
8 8
 )
9 9
 
10 10
 ADD_LIBRARY(adpcm SHARED ${adpcm_SRCS})
11
-SET_TARGET_PROPERTIES(adpcm PROPERTIES OUTPUT_NAME "adpcm")
12
-TARGET_LINK_LIBRARIES(adpcm ${CMAKE_DL_LIBS} pthread m)
11
+TARGET_LINK_LIBRARIES(adpcm ${CMAKE_DL_LIBS})
13 12
 
... ...
@@ -11,8 +11,7 @@ INCLUDE_DIRECTORIES (libbinrpc/include)
11 11
 SET_PROPERTY(TARGET libbinrpc PROPERTY IMPORTED_LOCATION ./libbinrpc/src/binrpcctrl.a)
12 12
 
13 13
 ADD_LIBRARY(binrpcctrl SHARED ${binrpcctrl_SRCS})
14
-SET_TARGET_PROPERTIES(binrpcctrl PROPERTIES OUTPUT_NAME "binrpcctrl")
15
-TARGET_LINK_LIBRARIES(binrpcctrl ${CMAKE_DL_LIBS} pthread m libbinrpc)
14
+TARGET_LINK_LIBRARIES(binrpcctrl ${CMAKE_DL_LIBS} libbinrpc)
16 15
 
17 16
 
18 17
 
... ...
@@ -12,8 +12,6 @@ time.c
12 12
 value.c
13 13
 )
14 14
 
15
-SET(CMAKE_VERBOSE_MAKEFILE ON)
16
-
17 15
 ###
18 16
 # Used flags
19 17
 #
... ...
@@ -4,6 +4,5 @@ Echo.cpp
4 4
 )
5 5
 
6 6
 ADD_LIBRARY(echo SHARED ${echo_SRCS})
7
-SET_TARGET_PROPERTIES(echo PROPERTIES OUTPUT_NAME "echo")
8
-TARGET_LINK_LIBRARIES(echo ${CMAKE_DL_LIBS} pthread m)
7
+TARGET_LINK_LIBRARIES(echo ${CMAKE_DL_LIBS})
9 8
 
... ...
@@ -4,6 +4,5 @@ g722.c
4 4
 
5 5
 #module_cflags  = -ansi # -DNOFPU
6 6
 ADD_LIBRARY(g722 SHARED ${g722_SRCS})
7
-SET_TARGET_PROPERTIES(g722 PROPERTIES OUTPUT_NAME "g722")
8
-TARGET_LINK_LIBRARIES(g722 ${CMAKE_DL_LIBS} pthread ${SPANDSP_LIBRARIES} m)
7
+TARGET_LINK_LIBRARIES(g722 ${CMAKE_DL_LIBS} spandsp)
9 8
 
... ...
@@ -4,7 +4,7 @@ set (gsm_SRCS
4 4
 
5 5
 INCLUDE_DIRECTORIES(${GSM_INCLUDE_DIR})
6 6
 
7
-ADD_LIBRARY(gsm SHARED ${gsm_SRCS})
8
-SET_TARGET_PROPERTIES(gsm PROPERTIES OUTPUT_NAME "gsm")
9
-TARGET_LINK_LIBRARIES(gsm ${CMAKE_DL_LIBS} pthread ${GSM_LIBRARIES} m)
7
+ADD_LIBRARY(libgsm SHARED ${gsm_SRCS})
8
+SET_TARGET_PROPERTIES(libgsm PROPERTIES OUTPUT_NAME "gsm")
9
+TARGET_LINK_LIBRARIES(libgsm ${CMAKE_DL_LIBS} gsm)
10 10
 
... ...
@@ -9,6 +9,5 @@ INCLUDE_DIRECTORIES (iLBC_rfc3951)
9 9
 SET_PROPERTY(TARGET libilbc PROPERTY IMPORTED_LOCATION ./iLBC_rfc3951/ilbc.a)
10 10
 
11 11
 ADD_LIBRARY(ilbc SHARED ${ilbc_SRCS})
12
-SET_TARGET_PROPERTIES(ilbc PROPERTIES OUTPUT_NAME "ilbc")
13
-TARGET_LINK_LIBRARIES(ilbc ${CMAKE_DL_LIBS} pthread m libilbc)
12
+TARGET_LINK_LIBRARIES(ilbc ${CMAKE_DL_LIBS} libilbc)
14 13
 
... ...
@@ -24,9 +24,6 @@ packing.c
24 24
 syntFilter.c
25 25
 )
26 26
 
27
-SET(CMAKE_VERBOSE_MAKEFILE ON)
28
-
29 27
 ADD_LIBRARY(libilbc STATIC ${ilbc_SRCS})
30
-SET_TARGET_PROPERTIES(libilbc PROPERTIES OUTPUT_NAME "ilbc")
31
-TARGET_LINK_LIBRARIES(libilbc ${CMAKE_DL_LIBS} pthread m)
28
+TARGET_LINK_LIBRARIES(libilbc ${CMAKE_DL_LIBS})
32 29
 
... ...
@@ -3,6 +3,5 @@ set (l16_SRCS
3 3
 )
4 4
 
5 5
 ADD_LIBRARY(l16 SHARED ${l16_SRCS})
6
-SET_TARGET_PROPERTIES(l16 PROPERTIES OUTPUT_NAME "l16")
7
-TARGET_LINK_LIBRARIES(l16 ${CMAKE_DL_LIBS} pthread m)
6
+TARGET_LINK_LIBRARIES(l16 ${CMAKE_DL_LIBS})
8 7
 
... ...
@@ -4,6 +4,5 @@ UserTimer.cpp
4 4
 )
5 5
 
6 6
 ADD_LIBRARY(session_timer SHARED ${session_timer_SRCS})
7
-SET_TARGET_PROPERTIES(session_timer PROPERTIES OUTPUT_NAME "session_timer")
8
-TARGET_LINK_LIBRARIES(session_timer ${CMAKE_DL_LIBS} pthread m)
7
+TARGET_LINK_LIBRARIES(session_timer ${CMAKE_DL_LIBS})
9 8
 
... ...
@@ -21,8 +21,7 @@ set (sipctrl_SRCS
21 21
 )
22 22
 
23 23
 ADD_LIBRARY(sipctrl SHARED ${sipctrl_SRCS})
24
-SET_TARGET_PROPERTIES(sipctrl PROPERTIES OUTPUT_NAME "sipctrl")
25
-TARGET_LINK_LIBRARIES(sipctrl ${CMAKE_DL_LIBS} pthread m)
24
+TARGET_LINK_LIBRARIES(sipctrl ${CMAKE_DL_LIBS})
26 25
 
27 26
 IF(SEMS_USE_IPV6)
28 27
 	ADD_DEFINITIONS(-DSUPPORT_IPV6)
... ...
@@ -5,7 +5,7 @@ set (speex_SRCS
5 5
 INCLUDE_DIRECTORIES(${SPEEX_INCLUDE_DIR})
6 6
 
7 7
 # module_cflags  = -ansi # -DNOFPU
8
-ADD_LIBRARY(speex SHARED ${speex_SRCS})
9
-SET_TARGET_PROPERTIES(speex PROPERTIES OUTPUT_NAME "speex")
10
-TARGET_LINK_LIBRARIES(speex ${CMAKE_DL_LIBS} pthread ${SPEEX_LIBRARIES} m)
8
+ADD_LIBRARY(libspeex SHARED ${speex_SRCS})
9
+SET_TARGET_PROPERTIES(libspeex PROPERTIES OUTPUT_NAME "speex")
10
+TARGET_LINK_LIBRARIES(libspeex ${CMAKE_DL_LIBS} speex)
11 11
 
... ...
@@ -8,11 +8,10 @@ query_stats.cxx
8 8
 )
9 9
 
10 10
 ADD_EXECUTABLE (sems-stats ${sems_stats_SRCS})
11
-TARGET_LINK_LIBRARIES(sems-stats ${CMAKE_DL_LIBS} stdc++ m)
11
+TARGET_LINK_LIBRARIES(sems-stats ${CMAKE_DL_LIBS} stdc++)
12 12
 
13 13
 ADD_LIBRARY(stats SHARED ${stats_SRCS})
14
-SET_TARGET_PROPERTIES(stats PROPERTIES OUTPUT_NAME "stats")
15
-TARGET_LINK_LIBRARIES(stats ${CMAKE_DL_LIBS} pthread m)
14
+TARGET_LINK_LIBRARIES(stats ${CMAKE_DL_LIBS})
16 15
 
17 16
 INSTALL(TARGETS sems-stats
18 17
 	RUNTIME DESTINATION sbin
... ...
@@ -4,6 +4,5 @@ UACAuth.cpp
4 4
 )
5 5
 
6 6
 ADD_LIBRARY(uac_auth SHARED ${uac_auth_SRCS})
7
-SET_TARGET_PROPERTIES(uac_auth PROPERTIES OUTPUT_NAME "uac_auth")
8
-TARGET_LINK_LIBRARIES(uac_auth ${CMAKE_DL_LIBS} pthread m)
7
+TARGET_LINK_LIBRARIES(uac_auth ${CMAKE_DL_LIBS})
9 8
 
... ...
@@ -5,6 +5,5 @@ set (wav_SRCS
5 5
 )
6 6
 
7 7
 ADD_LIBRARY(wav SHARED ${wav_SRCS})
8
-SET_TARGET_PROPERTIES(wav PROPERTIES OUTPUT_NAME "wav")
9
-TARGET_LINK_LIBRARIES(wav ${CMAKE_DL_LIBS} pthread m)
8
+TARGET_LINK_LIBRARIES(wav ${CMAKE_DL_LIBS})
10 9