Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
/ kms-core Public archive

Commit

Permalink
CMake: Do not make global includes
Browse files Browse the repository at this point in the history
Change-Id: I4a0d634d63cef63e291b3b4437295f5707e03249
  • Loading branch information
jcaden committed Sep 22, 2016
1 parent 2a91420 commit f351bf5
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 64 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ endif ()

enable_testing()

include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

add_subdirectory(src)
add_subdirectory(tests)

Expand Down
23 changes: 9 additions & 14 deletions src/gst-plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

include(GLibHelpers)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)

add_subdirectory(commons)

set(KMS_CORE_SOURCES
Expand All @@ -31,15 +26,15 @@ add_library(${LIBRARY_NAME}plugins MODULE ${KMS_CORE_SOURCES})

add_dependencies(${LIBRARY_NAME}plugins kmsgstcommons)

include_directories(
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-base-1.5_INCLUDE_DIRS}
${gstreamer-sdp-1.5_INCLUDE_DIRS}
${gstreamer-pbutils-1.5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
"${CMAKE_CURRENT_BINARY_DIR}/commons/"
"${CMAKE_CURRENT_SOURCE_DIR}/commons/"
set_property (TARGET ${LIBRARY_NAME}plugins
PROPERTY INCLUDE_DIRECTORIES
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-base-1.5_INCLUDE_DIRS}
${gstreamer-sdp-1.5_INCLUDE_DIRS}
${gstreamer-pbutils-1.5_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}/../../
${CMAKE_CURRENT_BINARY_DIR}/commons/
${CMAKE_CURRENT_SOURCE_DIR}/commons/
)

target_link_libraries(${LIBRARY_NAME}plugins
Expand Down
46 changes: 35 additions & 11 deletions src/gst-plugins/commons/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-base-1.5_SOURCE_DIRS}
${gstreamer-sdp-1.5_SOURCE_DIRS}
${gstreamer-pbutils-1.5_SOURCE_DIRS}
${gstreamer-video-1.5_INCLUDE_DIRS}
${uuid_INCLUDE_DIRS}
)

set(KMS_SDP_UTILS_SOURCES
sdp_utils.c
)
Expand All @@ -19,6 +8,14 @@ set(KMS_SDP_UTILS_HEADERS

add_library(sdputils ${KMS_SDP_UTILS_SOURCES} ${KMS_SDP_UTILS_HEADERS})

set_property (TARGET sdputils
PROPERTY INCLUDE_DIRECTORIES
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-base-1.5_INCLUDE_DIRS}
${gstreamer-sdp-1.5_INCLUDE_DIRS}
${gstreamer-pbutils-1.5_INCLUDE_DIRS}
)

target_link_libraries(sdputils
${gstreamer-1.5_LIBRARIES}
${gstreamer-base-1.5_LIBRARIES}
Expand All @@ -42,6 +39,11 @@ install(

add_library(kmsrefstruct kmsrefstruct.c kmsrefstruct.h)

set_property(TARGET kmsrefstruct
PROPERTY INCLUDE_DIRECTORIES
${gstreamer-1.5_INCLUDE_DIRS}
)

target_link_libraries(kmsrefstruct
${gstreamer-1.5_LIBRARIES}
)
Expand All @@ -60,6 +62,16 @@ set(KMS_UTILS

add_library(kmsutils ${KMS_UTILS})

set_property(TARGET kmsutils
PROPERTY INCLUDE_DIRECTORIES
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-base-1.5_INCLUDE_DIRS}
${gstreamer-sdp-1.5_INCLUDE_DIRS}
${gstreamer-pbutils-1.5_INCLUDE_DIRS}
${gstreamer-video-1.5_INCLUDE_DIRS}
${uuid_INCLUDE_DIRS}
)

set_target_properties(kmsutils PROPERTIES PUBLIC_HEADER kmsutils.h)

target_link_libraries(kmsutils
Expand Down Expand Up @@ -152,6 +164,18 @@ add_glib_marshal(KMS_COMMONS_SOURCES KMS_COMMONS_HEADERS kms-core-marshal __kms_

add_library(kmsgstcommons SHARED ${KMS_COMMONS_SOURCES} ${KMS_COMMONS_HEADERS})

set_property (TARGET kmsgstcommons
PROPERTY INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../../..
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-base-1.5_INCLUDE_DIRS}
${gstreamer-sdp-1.5_INCLUDE_DIRS}
${gstreamer-pbutils-1.5_INCLUDE_DIRS}
${gstreamer-rtp-1.5_INCLUDE_DIRS}
)

add_dependencies(kmsgstcommons kmsrefstruct kmsutils sdputils)

target_link_libraries(kmsgstcommons
Expand Down
2 changes: 1 addition & 1 deletion src/gst-plugins/commons/kmsparsetreebin.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#endif

#include "kmsparsetreebin.h"
#include <kmsutils.h>
#include "kmsutils.h"

#define GST_DEFAULT_NAME "parsetreebin"
#define GST_CAT_DEFAULT kms_parse_tree_bin_debug
Expand Down
2 changes: 1 addition & 1 deletion src/gst-plugins/commons/kmsrecordingprofile.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include <kmsrecordingprofile.h>
#include "kmsrecordingprofile.h"

static GstEncodingContainerProfile *
kms_recording_profile_create_webm_profile (gboolean has_audio,
Expand Down
11 changes: 6 additions & 5 deletions src/gst-plugins/commons/rtpsync/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)

set(KMS_RTP_SYNC_SOURCES
kmsrtpsynccontext.c
kmsrtpsynchronizer.c
Expand All @@ -22,6 +17,12 @@ target_link_libraries(kmsrtpsync
${gstreamer-rtp-1.5_LIBRARIES}
)

set_property (TARGET kmsrtpsync
PROPERTY INCLUDE_DIRECTORIES
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-rtp-1.5_INCLUDE_DIRS}
)

set(RTP_SYNC_INCLUDE_PREFIX "${INCLUDE_PREFIX}/rtpsync")

install(
Expand Down
18 changes: 13 additions & 5 deletions src/gst-plugins/commons/sdpagent/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)

set(KMS_SDP_AGENT_SOURCES
kmssdpagentcommon.c
kmssdpagent.c
Expand Down Expand Up @@ -78,6 +73,19 @@ set_target_properties(kmssdpagent PROPERTIES PUBLIC_HEADER "${KMS_SDP_AGENT_HEAD

set_target_properties(kmssdpagent PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})

set_property (TARGET kmssdpagent
PROPERTY INCLUDE_DIRECTORIES
${CMAKE_CURRENT_BINARY_DIR}/../../../../
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_SOURCE_DIR}/../../
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-base-1.5_INCLUDE_DIRS}
${gstreamer-sdp-1.5_INCLUDE_DIRS}
${gstreamer-pbutils-1.5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)

set(SDP_AGENT_INCLUDE_PREFIX "${INCLUDE_PREFIX}/sdpagent")

target_link_libraries(kmssdpagent
Expand Down
2 changes: 1 addition & 1 deletion src/gst-plugins/kmsbitratefilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#endif

#include "kmsbitratefilter.h"
#include <commons/kmsutils.h>
#include "commons/kmsutils.h"

#define PLUGIN_NAME "bitratefilter"

Expand Down
30 changes: 15 additions & 15 deletions src/gst-plugins/kmscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
#include <config.h>
#include <gst/gst.h>

#include <kmsagnosticbin.h>
#include <kmsagnosticbin3.h>
#include <kmshubport.h>
#include <kmsfilterelement.h>
#include <kmsaudiomixer.h>
#include <kmsaudiomixerbin.h>
#include <kmsbitratefilter.h>
#include <kmsbufferinjector.h>
#include <kmspassthrough.h>
#include <kmsdummysrc.h>
#include <kmsdummysink.h>
#include <kmsdummyduplex.h>
#include <kmsdummyrtp.h>
#include <kmsdummysdp.h>
#include <kmsdummyuri.h>
#include "kmsagnosticbin.h"
#include "kmsagnosticbin3.h"
#include "kmshubport.h"
#include "kmsfilterelement.h"
#include "kmsaudiomixer.h"
#include "kmsaudiomixerbin.h"
#include "kmsbitratefilter.h"
#include "kmsbufferinjector.h"
#include "kmspassthrough.h"
#include "kmsdummysrc.h"
#include "kmsdummysink.h"
#include "kmsdummyduplex.h"
#include "kmsdummyrtp.h"
#include "kmsdummysdp.h"
#include "kmsdummyuri.h"

static gboolean
kurento_init (GstPlugin * kurento)
Expand Down
18 changes: 10 additions & 8 deletions src/gst-plugins/vp8parse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
include_directories(
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-base-1.5_INCLUDE_DIRS}
${gstreamer-video-1.5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${VPX_INCLUDE_DIRS}
)

set(VP8PARSE_SOURCES
vp8parse.c
kmsvp8parse.c kmsvp8parse.h
)

add_library(vp8parse MODULE ${VP8PARSE_SOURCES})

set_property (TARGET vp8parse
PROPERTY INCLUDE_DIRECTORIES
${CMAKE_CURRENT_BINARY_DIR}/../../../
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-base-1.5_INCLUDE_DIRS}
${gstreamer-video-1.5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${VPX_INCLUDE_DIRS}
)

target_link_libraries(vp8parse
${gstreamer-1.5_LIBRARIES}
${gstreamer-base-1.5_LIBRARIES}
Expand Down
3 changes: 3 additions & 0 deletions tests/check/element/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ foreach(test ${ALL_TESTS})
target_include_directories(test_${test} PRIVATE
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-check-1.5_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}/../../../
)

target_link_libraries(test_${test}
Expand All @@ -40,6 +41,7 @@ target_include_directories(test_sdp_agent PRIVATE
${gstreamer-check-1.5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../../src/gst-plugins/commons/
${CMAKE_CURRENT_SOURCE_DIR}/../../../src/gst-plugins/commons/sdpagent
${CMAKE_CURRENT_BINARY_DIR}/../../../
)

target_link_libraries(test_sdp_agent
Expand All @@ -57,6 +59,7 @@ target_include_directories(test_metadata PRIVATE
${gstreamer-1.5_INCLUDE_DIRS}
${gstreamer-check-1.5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../../src/gst-plugins/commons/
${CMAKE_CURRENT_BINARY_DIR}/../../../
)

target_link_libraries(test_metadata
Expand Down

0 comments on commit f351bf5

Please sign in to comment.