Export all relevant pkg-config flags

This commit is contained in:
Jeffrey Pfau 2014-10-08 00:40:57 -07:00
parent 5333394755
commit e65ef28486
1 changed files with 7 additions and 1 deletions

View File

@ -37,8 +37,12 @@ function(find_feature FEATURE_NAME FEATURE_REQUIRES)
set(${FEATURE_NAME} OFF PARENT_SCOPE) set(${FEATURE_NAME} OFF PARENT_SCOPE)
return() return()
endif() endif()
set(${REQUIRE}_LIBRARIES ${${REQUIRE}_LIBRARIES} PARENT_SCOPE) set(${REQUIRE}_CFLAGS_OTHER ${${REQUIRE}_CFLAGS_OTHER} PARENT_SCOPE)
set(${REQUIRE}_FOUND ${${REQUIRE}_FOUND} PARENT_SCOPE)
set(${REQUIRE}_INCLUDE_DIRS ${${REQUIRE}_INCLUDE_DIRS} PARENT_SCOPE) set(${REQUIRE}_INCLUDE_DIRS ${${REQUIRE}_INCLUDE_DIRS} PARENT_SCOPE)
set(${REQUIRE}_LIBRARIES ${${REQUIRE}_LIBRARIES} PARENT_SCOPE)
set(${REQUIRE}_LIBRARY_DIRS ${${REQUIRE}_LIBRARY_DIRS} PARENT_SCOPE)
set(${REQUIRE}_LDFLAGS_OTHER ${${REQUIRE}_LDFLAGS_OTHER} PARENT_SCOPE)
endforeach() endforeach()
endfunction() endfunction()
@ -116,6 +120,7 @@ source_group("ARM debugger" FILES ${DEBUGGER_SRC})
if(USE_FFMPEG) if(USE_FFMPEG)
add_definitions(-DUSE_FFMPEG) add_definitions(-DUSE_FFMPEG)
include_directories(AFTER ${LIBAVCODEC_INCLUDE_DIRS} ${LIBAVFORMAT_INCLUDE_DIRS} ${LIBAVUTIL_INCLUDE_DIRS}) include_directories(AFTER ${LIBAVCODEC_INCLUDE_DIRS} ${LIBAVFORMAT_INCLUDE_DIRS} ${LIBAVUTIL_INCLUDE_DIRS})
link_directories(${LIBAVCODEC_LIBRARY_DIRS} ${LIBAVFORMAT_LIBRARY_DIRS} ${LIBAVUTIL_LIBRARY_DIRS})
list(APPEND UTIL_SRC "${CMAKE_SOURCE_DIR}/src/platform/ffmpeg/ffmpeg-encoder.c") list(APPEND UTIL_SRC "${CMAKE_SOURCE_DIR}/src/platform/ffmpeg/ffmpeg-encoder.c")
list(APPEND DEPENDENCY_LIB ${LIBAVCODEC_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVUTIL_LIBRARIES}) list(APPEND DEPENDENCY_LIB ${LIBAVCODEC_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVUTIL_LIBRARIES})
endif() endif()
@ -128,6 +133,7 @@ endif()
if(USE_LIBZIP) if(USE_LIBZIP)
include_directories(AFTER ${LIBZIP_INCLUDE_DIRS}) include_directories(AFTER ${LIBZIP_INCLUDE_DIRS})
link_directories(AFTER ${LIBZIP_LIBRARY_DIRS})
list(APPEND DEPENDENCY_LIB ${LIBZIP_LIBRARIES}) list(APPEND DEPENDENCY_LIB ${LIBZIP_LIBRARIES})
add_definitions(-DENABLE_LIBZIP) add_definitions(-DENABLE_LIBZIP)
endif() endif()