mirror of https://github.com/mgba-emu/mgba.git
Clean up CMakeFiles after adding find_feature
This commit is contained in:
parent
fe9d476a77
commit
5333394755
|
@ -37,6 +37,8 @@ function(find_feature FEATURE_NAME FEATURE_REQUIRES)
|
|||
set(${FEATURE_NAME} OFF PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
set(${REQUIRE}_LIBRARIES ${${REQUIRE}_LIBRARIES} PARENT_SCOPE)
|
||||
set(${REQUIRE}_INCLUDE_DIRS ${${REQUIRE}_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
@ -112,24 +114,20 @@ endif()
|
|||
source_group("ARM debugger" FILES ${DEBUGGER_SRC})
|
||||
|
||||
if(USE_FFMPEG)
|
||||
pkg_search_module(LIBAVCODEC libavcodec)
|
||||
pkg_search_module(LIBAVFORMAT libavcodec;libavformat;libavutil)
|
||||
pkg_search_module(LIBAVUTIL libavutil)
|
||||
add_definitions(-DUSE_FFMPEG)
|
||||
include_directories(AFTER ${LIBAVCODEC_INCLUDE_DIRS} ${LIBAVFORMAT_INCLUDE_DIRS} ${LIBAVUTIL_INCLUDE_DIRS})
|
||||
list(APPEND UTIL_SRC "${CMAKE_SOURCE_DIR}/src/platform/ffmpeg/ffmpeg-encoder.c")
|
||||
list(APPEND DEPENDENCY_LIB ${LIBAVCODEC_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVUTIL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(USE_PNG)
|
||||
find_package(PNG)
|
||||
find_package(ZLIB)
|
||||
add_definitions(-DUSE_PNG)
|
||||
include_directories(${PNG_PNG_INCLUDE_DIR})
|
||||
include_directories(AFTER ${PNG_INCLUDE_DIRS})
|
||||
list(APPEND DEPENDENCY_LIB ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(USE_LIBZIP)
|
||||
include_directories(${LIBZIP_INCLUDE_DIRS})
|
||||
include_directories(AFTER ${LIBZIP_INCLUDE_DIRS})
|
||||
list(APPEND DEPENDENCY_LIB ${LIBZIP_LIBRARIES})
|
||||
add_definitions(-DENABLE_LIBZIP)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue