Remove add_vendor_includes macro and ensure vendor includes are always correctly ordered in standalone builds.

This commit is contained in:
casey langen 2023-03-19 20:27:10 -07:00
parent e7726bc036
commit ac9bb0b7d5
7 changed files with 9 additions and 11 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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()

View File

@ -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})

View File

@ -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)

View File

@ -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)