Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
f122b8e7
Commit
f122b8e7
authored
Feb 28, 2017
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use bc_apply_compile_flags from bctoolbox CMake utils.
parent
98d0a05c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
31 deletions
+16
-31
CMakeLists.txt
CMakeLists.txt
+0
-15
console/CMakeLists.txt
console/CMakeLists.txt
+1
-1
coreapi/CMakeLists.txt
coreapi/CMakeLists.txt
+3
-3
coreapi/help/CMakeLists.txt
coreapi/help/CMakeLists.txt
+1
-1
daemon/CMakeLists.txt
daemon/CMakeLists.txt
+2
-2
gtk/CMakeLists.txt
gtk/CMakeLists.txt
+2
-2
tester/CMakeLists.txt
tester/CMakeLists.txt
+2
-2
tools/CMakeLists.txt
tools/CMakeLists.txt
+5
-5
No files found.
CMakeLists.txt
View file @
f122b8e7
...
...
@@ -65,21 +65,6 @@ option(CXX_WRAPPER "Build the C++ wrapper for Liblinphone." OFF)
set
(
CMAKE_CXX_STANDARD 11
)
macro
(
apply_compile_flags SOURCE_FILES
)
if
(
${
SOURCE_FILES
}
)
set
(
options
""
)
foreach
(
a
${
ARGV
}
)
if
(
STRICT_OPTIONS_
${
a
}
)
string
(
REPLACE
";"
" "
options_
${
a
}
"
${
STRICT_OPTIONS_
${
a
}}
"
)
set
(
options
"
${
options
}
${
options_
${
a
}}
"
)
endif
()
endforeach
()
if
(
options
)
set_source_files_properties
(
${${
SOURCE_FILES
}}
PROPERTIES COMPILE_FLAGS
"
${
options
}
"
)
endif
()
endif
()
endmacro
()
if
(
ENABLE_STATIC
)
set
(
LINPHONE_LIBS_FOR_TOOLS linphone-static
)
else
()
...
...
console/CMakeLists.txt
View file @
f122b8e7
...
...
@@ -29,7 +29,7 @@ set(LINPHONECSH_SOURCE_FILES
shell.c
)
apply_compile_flags
(
LINPHONEC_SOURCE_FILES
"CPP"
"C"
)
bc_
apply_compile_flags
(
LINPHONEC_SOURCE_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
if
(
MSVC
)
get_source_file_property
(
COMMANDS_C_COMPILE_FLAGS commands.c COMPILE_FLAGS
)
set
(
COMMANDS_C_COMPILE_FLAGS
"
${
COMMANDS_C_COMPILE_FLAGS
}
/wd4996"
)
# Disable "was declared deprecated" warnings
...
...
coreapi/CMakeLists.txt
View file @
f122b8e7
...
...
@@ -185,9 +185,9 @@ else()
list
(
APPEND LINPHONE_SOURCE_FILES_C vcard_stubs.c
)
endif
()
apply_compile_flags
(
LINPHONE_SOURCE_FILES_C
"CPP"
"C"
)
apply_compile_flags
(
LINPHONE_SOURCE_FILES_CXX
"CPP"
"
CXX
"
)
apply_compile_flags
(
LINPHONE_SOURCE_FILES_OBJC
"CPP"
"
OBJC
"
)
bc_
apply_compile_flags
(
LINPHONE_SOURCE_FILES_C
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
bc_
apply_compile_flags
(
LINPHONE_SOURCE_FILES_CXX
STRICT_OPTIONS_CPP STRICT_OPTIONS_
CXX
)
bc_
apply_compile_flags
(
LINPHONE_SOURCE_FILES_OBJC
STRICT_OPTIONS_CPP STRICT_OPTIONS_
OBJC
)
if
(
ENABLE_STATIC
)
add_library
(
linphone-static STATIC
${
LINPHONE_HEADER_FILES
}
${
LINPHONE_PRIVATE_HEADER_FILES
}
${
LINPHONE_SOURCE_FILES_C
}
${
LINPHONE_SOURCE_FILES_CXX
}
${
LINPHONE_SOURCE_FILES_OBJC
}
)
...
...
coreapi/help/CMakeLists.txt
View file @
f122b8e7
...
...
@@ -71,7 +71,7 @@ if (ENABLE_TOOLS)
file
(
GLOB EXECUTABLES_SOURCE RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
"*.c"
)
foreach
(
EXECUTABLE
${
EXECUTABLES_SOURCE
}
)
string
(
REPLACE
".c"
""
EXECUTABLE_NAME
${
EXECUTABLE
}
)
apply_compile_flags
(
${
EXECUTABLE
}
"CPP"
"C"
)
bc_
apply_compile_flags
(
${
EXECUTABLE
}
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
add_executable
(
${
EXECUTABLE_NAME
}
${
USE_BUNDLE
}
${
EXECUTABLE
}
)
target_link_libraries
(
${
EXECUTABLE_NAME
}
${
LINPHONE_LIBS_FOR_TOOLS
}
${
MEDIASTREAMER2_LIBRARIES
}
)
set_target_properties
(
${
EXECUTABLE_NAME
}
PROPERTIES LINK_FLAGS
"
${
LINPHONE_LDFLAGS
}
"
)
...
...
daemon/CMakeLists.txt
View file @
f122b8e7
...
...
@@ -110,8 +110,8 @@ set(DAEMON_PIPETEST_SOURCE_FILES
daemon-pipetest.c
)
apply_compile_flags
(
DAEMON_SOURCE_FILES
"CPP"
"
CXX
"
)
apply_compile_flags
(
DAEMON_PIPETEST_SOURCE_FILES
"CPP"
"C"
)
bc_
apply_compile_flags
(
DAEMON_SOURCE_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_
CXX
)
bc_
apply_compile_flags
(
DAEMON_PIPETEST_SOURCE_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
add_executable
(
linphone-daemon
${
DAEMON_SOURCE_FILES
}
)
target_include_directories
(
linphone-daemon PRIVATE
${
CMAKE_CURRENT_LIST_DIR
}
)
...
...
gtk/CMakeLists.txt
View file @
f122b8e7
...
...
@@ -84,8 +84,8 @@ if (APPLE)
list
(
APPEND OBJC_FILES mac.m
)
endif
()
apply_compile_flags
(
OBJC_FILES
"CPP"
"
OBJC
"
)
apply_compile_flags
(
SOURCE_FILES
"CPP"
"C"
)
bc_
apply_compile_flags
(
OBJC_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_
OBJC
)
bc_
apply_compile_flags
(
SOURCE_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
if
(
WIN32
)
add_executable
(
linphone-gtk WIN32
${
SOURCE_FILES
}
)
...
...
tester/CMakeLists.txt
View file @
f122b8e7
...
...
@@ -196,8 +196,8 @@ if(APPLE)
endif
()
endif
()
apply_compile_flags
(
SOURCE_FILES_C
"CPP"
"C"
)
apply_compile_flags
(
SOURCE_FILES_OBJC
"CPP"
"
OBJC
"
)
bc_
apply_compile_flags
(
SOURCE_FILES_C
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
bc_
apply_compile_flags
(
SOURCE_FILES_OBJC
STRICT_OPTIONS_CPP STRICT_OPTIONS_
OBJC
)
if
(
MSVC
)
get_source_file_property
(
MESSAGE_TESTER_C_COMPILE_FLAGS message_tester.c COMPILE_FLAGS
)
...
...
tools/CMakeLists.txt
View file @
f122b8e7
...
...
@@ -44,31 +44,31 @@ set(LP_GEN_WRAPPERS_LIBS
${
XML2_LIBRARIES
}
)
apply_compile_flags
(
LP_GEN_WRAPPERS_SOURCE_FILES
"CPP"
"
CXX
"
)
bc_
apply_compile_flags
(
LP_GEN_WRAPPERS_SOURCE_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_
CXX
)
add_executable
(
lp-gen-wrappers
${
USE_BUNDLE
}
${
LP_GEN_WRAPPERS_SOURCE_FILES
}
)
target_link_libraries
(
lp-gen-wrappers
${
LP_GEN_WRAPPERS_LIBS
}
)
set_target_properties
(
lp-gen-wrappers PROPERTIES LINK_FLAGS
"
${
LINPHONE_LDFLAGS
}
"
)
set
(
LP_AUTO_ANSWER_SOURCE_FILES auto_answer.c
)
apply_compile_flags
(
LP_AUTO_ANSWER_SOURCE_FILES
"CPP"
"C"
)
bc_
apply_compile_flags
(
LP_AUTO_ANSWER_SOURCE_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
add_executable
(
lp-auto-answer
${
USE_BUNDLE
}
${
LP_AUTO_ANSWER_SOURCE_FILES
}
)
target_link_libraries
(
lp-auto-answer
${
LINPHONE_LIBS_FOR_TOOLS
}
${
MEDIASTREAMER2_LIBRARIES
}
)
set_target_properties
(
lp-auto-answer PROPERTIES LINK_FLAGS
"
${
LINPHONE_LDFLAGS
}
"
)
set
(
LP_SENDMSG_SOURCE_FILES lpsendmsg.c
)
apply_compile_flags
(
LP_SENDMSG_SOURCE_FILES
"CPP"
"C"
)
bc_
apply_compile_flags
(
LP_SENDMSG_SOURCE_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
add_executable
(
lp-sendmsg
${
USE_BUNDLE
}
${
LP_SENDMSG_SOURCE_FILES
}
)
target_link_libraries
(
lp-sendmsg
${
LINPHONE_LIBS_FOR_TOOLS
}
${
ORTP_LIBRARIES
}
${
MEDIASTREAMER2_LIBRARIES
}
)
set_target_properties
(
lp-sendmsg PROPERTIES LINK_FLAGS
"
${
LINPHONE_LDFLAGS
}
"
)
set
(
LP_LPC2XML_TEST_SOURCE_FILES lpc2xml_test.c
)
apply_compile_flags
(
LP_LPC2XML_TEST_SOURCE_FILES
"CPP"
"C"
)
bc_
apply_compile_flags
(
LP_LPC2XML_TEST_SOURCE_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
add_executable
(
lpc2xml_test
${
USE_BUNDLE
}
${
LP_LPC2XML_TEST_SOURCE_FILES
}
)
target_link_libraries
(
lpc2xml_test
${
LINPHONE_LIBS_FOR_TOOLS
}
${
ORTP_LIBRARIES
}
${
MEDIASTREAMER2_LIBRARIES
}
)
set_target_properties
(
lpc2xml_test PROPERTIES LINK_FLAGS
"
${
LINPHONE_LDFLAGS
}
"
)
set
(
LP_XML2LPC_TEST_SOURCE_FILES xml2lpc_test.c
)
apply_compile_flags
(
LP_XML2LPC_TEST_SOURCE_FILES
"CPP"
"C"
)
bc_
apply_compile_flags
(
LP_XML2LPC_TEST_SOURCE_FILES
STRICT_OPTIONS_CPP STRICT_OPTIONS_C
)
add_executable
(
xml2lpc_test
${
USE_BUNDLE
}
${
LP_XML2LPC_TEST_SOURCE_FILES
}
)
target_link_libraries
(
xml2lpc_test
${
LINPHONE_LIBS_FOR_TOOLS
}
${
ORTP_LIBRARIES
}
${
MEDIASTREAMER2_LIBRARIES
}
)
set_target_properties
(
xml2lpc_test PROPERTIES LINK_FLAGS
"
${
LINPHONE_LDFLAGS
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment