Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
cc365769
Commit
cc365769
authored
Sep 03, 2014
by
Ghislain MARY
Browse files
Handle Apple specific link flags.
parent
705401c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
CMakeLists.txt
CMakeLists.txt
+9
-0
FindMS2.cmake.in
FindMS2.cmake.in
+6
-3
src/CMakeLists.txt
src/CMakeLists.txt
+3
-11
No files found.
CMakeLists.txt
View file @
cc365769
...
...
@@ -318,6 +318,15 @@ else()
set
(
PACKAGE_PLUGINS_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/lib/mediastreamer/plugins"
)
set
(
PACKAGE_DATA_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/share"
)
endif
()
if
(
APPLE
)
set
(
APPLE_SPECIFIC_LINK_FLAGS
)
if
(
ENABLE_VIDEO
)
list
(
APPEND APPLE_SPECIFIC_LINK_FLAGS
"-framework Cocoa"
"-framework OpenGL"
"-framework QuartzCore"
"-framework QTKit"
)
endif
()
if
(
ENABLE_MACSND
)
list
(
APPEND APPLE_SPECIFIC_LINK_FLAGS
"-framework Carbon"
"-framework AudioUnit"
)
endif
()
endif
()
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/mediastreamer-config.h.cmake
${
CMAKE_CURRENT_BINARY_DIR
}
/mediastreamer-config.h
)
set_source_files_properties
(
${
CMAKE_CURRENT_BINARY_DIR
}
/mediastreamer-config.h PROPERTIES GENERATED ON
)
add_definitions
(
-DHAVE_CONFIG_H
)
...
...
FindMS2.cmake.in
View file @
cc365769
...
...
@@ -26,6 +26,7 @@
# MS2_INCLUDE_DIRS - the mediastreamer2 include directory
# MS2_LIBRARIES - The libraries needed to use mediastreamer2
# MS2_CPPFLAGS - The compilation flags needed to use mediastreamer2
# MS2_LDFLAGS - The linking flags needed to use mediastreamer2
find_package(ORTP REQUIRED)
if(@ENABLE_GSM@)
...
...
@@ -161,12 +162,14 @@ if(WIN32)
endif(WIN32)
list(REMOVE_DUPLICATES MS2_INCLUDE_DIRS)
list(REMOVE_DUPLICATES MS2_LIBRARIES)
set(MS2_CPPFLAGS ${ORTP_CPPFLAGS})
set(MS2_CPPFLAGS "${ORTP_CPPFLAGS}")
set(MS2_LDFLAGS "@APPLE_SPECIFIC_LINK_FLAGS@")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MS2
DEFAULT_MSG
MS2_INCLUDE_DIRS MS2_LIBRARIES MS2_BASE_LIBRARY MS2_VOIP_LIBRARY
MS2_CPPFLAGS
MS2_INCLUDE_DIRS MS2_LIBRARIES MS2_BASE_LIBRARY MS2_VOIP_LIBRARY
)
mark_as_advanced(MS2_INCLUDE_DIRS MS2_LIBRARIES MS2_BASE_LIBRARY MS2_VOIP_LIBRARY MS2_CPPFLAGS)
mark_as_advanced(MS2_INCLUDE_DIRS MS2_LIBRARIES MS2_BASE_LIBRARY MS2_VOIP_LIBRARY MS2_CPPFLAGS
MS2_LDFLAGS
)
src/CMakeLists.txt
View file @
cc365769
...
...
@@ -394,17 +394,9 @@ else()
endif
()
endif
()
endif
()
if
(
APPLE
)
set
(
APPLE_SPECIFIC_LINK_FLAGS
)
if
(
ENABLE_VIDEO
)
list
(
APPEND APPLE_SPECIFIC_LINK_FLAGS
"-framework Cocoa"
"-framework OpenGL"
"-framework QuartzCore"
)
endif
()
if
(
ENABLE_MACSND
)
list
(
APPEND APPLE_SPECIFIC_LINK_FLAGS
"-framework Carbon"
"-framework AudioUnit"
)
endif
()
if
(
APPLE_SPECIFIC_LINK_FLAGS
)
set_target_properties
(
mediastreamer_voip PROPERTIES LINK_FLAGS
${
APPLE_SPECIFIC_LINK_FLAGS
}
)
endif
()
string
(
REPLACE
";"
" "
APPLE_SPECIFIC_LINK_FLAGS_STR
"
${
APPLE_SPECIFIC_LINK_FLAGS
}
"
)
if
(
NOT
"
${
APPLE_SPECIFIC_LINK_FLAGS_STR
}
"
STREQUAL
""
)
set_target_properties
(
mediastreamer_voip PROPERTIES LINK_FLAGS
${
APPLE_SPECIFIC_LINK_FLAGS_STR
}
)
endif
()
install
(
TARGETS mediastreamer_voip
...
...
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