mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 07:39:26 +01:00
try for system libmgba first
This commit is contained in:
parent
d853da3b0b
commit
afde3a0e0d
15
CMake/FindLIBMGBA.cmake
Normal file
15
CMake/FindLIBMGBA.cmake
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
find_path(LIBMGBA_INCLUDE_DIR flags.h PATH_SUFFIXES mgba)
|
||||||
|
find_library(LIBMGBA_LIBRARY mgba)
|
||||||
|
mark_as_advanced(LIBMGBA_INCLUDE_DIR LIBMGBA_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LIBMGBA DEFAULT_MSG
|
||||||
|
LIBMGBA_INCLUDE_DIR LIBMGBA_LIBRARY)
|
||||||
|
|
||||||
|
if(LIBMGBA_FOUND AND NOT mGBA::mgba)
|
||||||
|
add_library(mGBA::mgba UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(mGBA::mgba PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${LIBMGBA_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${LIBMGBA_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
@ -944,8 +944,11 @@ if(NOT ENABLE_QT)
|
|||||||
set(USE_MGBA 0)
|
set(USE_MGBA 0)
|
||||||
endif()
|
endif()
|
||||||
if(USE_MGBA)
|
if(USE_MGBA)
|
||||||
message(STATUS "Using static libmgba from Externals")
|
find_package(LIBMGBA)
|
||||||
add_subdirectory(Externals/mGBA)
|
if(NOT LIBMGBA_FOUND)
|
||||||
|
message(STATUS "Using static libmgba from Externals")
|
||||||
|
add_subdirectory(Externals/mGBA)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(SYSTEMD)
|
find_package(SYSTEMD)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user