Skip to content

Commit

Permalink
Remove add_vendor_includes macro and ensure vendor includes are alw…
Browse files Browse the repository at this point in the history
…ays correctly ordered in standalone builds.
  • Loading branch information
clangen committed Mar 20, 2023
1 parent e7726bc commit ac9bb0b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .cmake/FindVendorLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,3 @@ macro(find_vendor_library target_var library_name)
find_library(${target_var} NAMES ${library_name} PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH)
message(STATUS "[find-vendor-library] '${library_name}' resolved to '${${target_var}}'")
endmacro(find_vendor_library)

macro(add_vendor_includes target_project)
target_include_directories(${target_project} PRIVATE BEFORE ${VENDOR_INCLUDE_DIRECTORIES})
message(STATUS "[add-vendor-includes] adding vendor includes to '${target_project}'")
endmacro(add_vendor_includes)
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ include(CMakeToolsHelpers OPTIONAL)
include(CheckAtomic)
include(AddPlugin)
include(ConfigureRpath)
include(ConfigureStandalone)
include(ConfigureBsdPaths)
include(ConfigureStandalone)
include(AddDarwinSystemLibs)
include(AddLinuxSystemLibs)
include(ConfigureCurses)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/ffmpegdecoder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set (ffmpegdecoder_SOURCES
add_library(ffmpegdecoder SHARED ${ffmpegdecoder_SOURCES})

if (${BUILD_STANDALONE} MATCHES "true")
add_vendor_includes(ffmpegdecoder)
include_directories(BEFORE ${VENDOR_INCLUDE_DIRECTORIES})
find_vendor_library(AVCODEC avcodec-musikcube)
find_vendor_library(AVUTIL avutil-musikcube)
find_vendor_library(AVFORMAT avformat-musikcube)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/gmedecoder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ add_definitions(-DHAVE_STDINT_H)

if (${BUILD_STANDALONE} MATCHES "true")
add_library(gmedecoder SHARED ${gmedecoder_SOURCES})
add_vendor_includes(gmedecoder)
include_directories(BEFORE ${VENDOR_INCLUDE_DIRECTORIES})
find_vendor_library(GME gme)
target_link_libraries(gmedecoder ${GME})
else()
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/httpdatastream/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set (httpdatastream_SOURCES

add_library(httpdatastream SHARED ${httpdatastream_SOURCES})

add_vendor_includes(httpdatastream)
if (${BUILD_STANDALONE} MATCHES "true")
include_directories(BEFORE ${VENDOR_INCLUDE_DIRECTORIES})
endif()

target_include_directories(httpdatastream BEFORE PUBLIC)
target_link_libraries(httpdatastream ${LIBCURL})
2 changes: 1 addition & 1 deletion src/plugins/stockencoders/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set (stockencoders_SOURCES
add_library(stockencoders SHARED ${stockencoders_SOURCES})

if (${BUILD_STANDALONE} MATCHES "true")
add_vendor_includes(stockencoders)
include_directories(BEFORE ${VENDOR_INCLUDE_DIRECTORIES})
find_vendor_library(AVCODEC avcodec-musikcube)
find_vendor_library(AVUTIL avutil-musikcube)
find_vendor_library(AVFORMAT avformat-musikcube)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/taglib_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ find_library(LIBZ z)

if (${BUILD_STANDALONE} MATCHES "true")
find_vendor_library(LIBTAG tag)
include_directories(BEFORE ${VENDOR_INCLUDE_DIRECTORIES})
else()
find_library(LIBTAG tag)
endif()

message(STATUS "[taglibmetadatareader] using ${LIBTAG}")
target_link_libraries(taglibreader ${LIBTAG} ${LIBZ})
add_vendor_includes(taglibreader)

0 comments on commit ac9bb0b

Please sign in to comment.