cmake: include(Find…)->find_package(…)
This commit is contained in:
parent
63011f1402
commit
875563787f
|
@ -145,7 +145,7 @@ function(enable_precompiled_headers PRECOMPILED_HEADER SOURCE_FILE SOURCE_VARIAB
|
|||
endfunction(enable_precompiled_headers)
|
||||
|
||||
# for revision info
|
||||
include(FindGit OPTIONAL)
|
||||
find_package(Git)
|
||||
if(GIT_FOUND AND NOT DOLPHIN_WC_REVISION)
|
||||
# defines DOLPHIN_WC_REVISION
|
||||
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
|
||||
|
@ -471,13 +471,13 @@ add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE)
|
|||
include(CheckLib)
|
||||
include(CheckCXXSourceRuns)
|
||||
|
||||
include(FindOpenGL)
|
||||
find_package(OpenGL)
|
||||
if (OPENGL_GL)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_ALSA)
|
||||
include(FindALSA OPTIONAL)
|
||||
find_package(ALSA)
|
||||
if(ALSA_FOUND)
|
||||
add_definitions(-DHAVE_ALSA=1)
|
||||
message("ALSA found, enabling ALSA sound backend")
|
||||
|
@ -529,7 +529,7 @@ else()
|
|||
endif()
|
||||
|
||||
if(ENABLE_OPENAL)
|
||||
include(FindOpenAL OPTIONAL)
|
||||
find_package(OpenAL)
|
||||
if(OPENAL_FOUND)
|
||||
add_definitions(-DHAVE_OPENAL=1)
|
||||
include_directories(${OPENAL_INCLUDE_DIR})
|
||||
|
@ -543,7 +543,7 @@ else()
|
|||
endif()
|
||||
|
||||
if(ENABLE_LLVM)
|
||||
include(FindLLVM OPTIONAL)
|
||||
find_package(LLVM)
|
||||
if (LLVM_FOUND)
|
||||
add_definitions(-DHAS_LLVM=1)
|
||||
set(HAS_LLVM 1)
|
||||
|
@ -558,7 +558,7 @@ endif()
|
|||
set(USE_X11 0)
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT ANDROID AND NOT ENABLE_HEADLESS)
|
||||
include(FindX11)
|
||||
find_package(X11)
|
||||
if(TRY_X11 AND X11_FOUND)
|
||||
set(USE_X11 1)
|
||||
add_definitions(-DHAVE_X11=1)
|
||||
|
@ -620,7 +620,7 @@ if(NOT ANDROID)
|
|||
endif()
|
||||
|
||||
if(OPROFILING)
|
||||
include(FindOProfile)
|
||||
find_package(OProfile)
|
||||
if(OPROFILE_FOUND)
|
||||
message("OProfile found, enabling profiling support")
|
||||
add_definitions(-DUSE_OPROFILE=1)
|
||||
|
@ -636,8 +636,8 @@ if(USE_EGL)
|
|||
endif()
|
||||
|
||||
if(ENABLE_EVDEV)
|
||||
include(FindLibudev REQUIRED)
|
||||
include(FindLibevdev REQUIRED)
|
||||
find_package(Libudev REQUIRED)
|
||||
find_package(Libevdev REQUIRED)
|
||||
if(LIBUDEV_FOUND AND LIBEVDEV_FOUND)
|
||||
message("libevdev/libudev found, enabling evdev controller backend")
|
||||
add_definitions(-DHAVE_LIBUDEV=1)
|
||||
|
@ -718,13 +718,8 @@ if(NOT XXHASH_FOUND)
|
|||
endif()
|
||||
LIST(APPEND LIBS xxhash)
|
||||
|
||||
# If zlib has already been found on a previous run of cmake don't check again
|
||||
# as the check seems to take a long time.
|
||||
if(NOT ZLIB_FOUND)
|
||||
include(FindZLIB OPTIONAL)
|
||||
endif()
|
||||
find_package(ZLIB)
|
||||
if(ZLIB_FOUND)
|
||||
set(ZLIB_FOUND 1 CACHE INTERNAL "")
|
||||
message("Using shared zlib")
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
else(ZLIB_FOUND)
|
||||
|
@ -772,14 +767,14 @@ if(OPENAL_FOUND)
|
|||
endif()
|
||||
|
||||
if(ENABLE_SDL)
|
||||
include(FindSDL2 OPTIONAL)
|
||||
find_package(SDL2)
|
||||
if(SDL2_FOUND)
|
||||
message("Using shared SDL2")
|
||||
add_definitions(-DHAVE_SDL=1)
|
||||
include_directories(${SDL2_INCLUDE_DIR})
|
||||
else(SDL2_FOUND)
|
||||
# SDL2 not found, try SDL
|
||||
include(FindSDL OPTIONAL)
|
||||
find_package(SDL OPTIONAL)
|
||||
if(SDL_FOUND)
|
||||
message("Using shared SDL")
|
||||
add_definitions(-DHAVE_SDL=1)
|
||||
|
@ -821,7 +816,7 @@ endif()
|
|||
|
||||
if(USE_UPNP)
|
||||
if(NOT APPLE)
|
||||
include(FindMiniupnpc)
|
||||
find_package(Miniupnpc)
|
||||
endif()
|
||||
if(MINIUPNPC_FOUND AND MINIUPNPC_API_VERSION GREATER 8)
|
||||
message("Using shared miniupnpc")
|
||||
|
@ -837,7 +832,7 @@ if(USE_UPNP)
|
|||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
include(FindMbedTLS)
|
||||
find_package(MbedTLS)
|
||||
endif()
|
||||
if(MBEDTLS_FOUND)
|
||||
message("Using shared mbed TLS")
|
||||
|
@ -849,7 +844,7 @@ else()
|
|||
include_directories(Externals/mbedtls/include)
|
||||
endif()
|
||||
|
||||
include(FindCURL OPTIONAL)
|
||||
find_package(CURL)
|
||||
if(CURL_FOUND)
|
||||
message("Using shared libcurl")
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
|
@ -885,7 +880,6 @@ endif()
|
|||
list(APPEND LIBS ${ICONV_LIBRARIES})
|
||||
|
||||
if(NOT ANDROID)
|
||||
include(FindHIDAPI OPTIONAL)
|
||||
find_package(HIDAPI)
|
||||
if(HIDAPI_FOUND)
|
||||
message("Using shared ${HIDAPI_LIBRARIES} ${HIDAPI_VERSION}")
|
||||
|
@ -927,8 +921,7 @@ if(ENABLE_QT2)
|
|||
endif()
|
||||
|
||||
if(NOT DISABLE_WX)
|
||||
include(FindwxWidgets OPTIONAL)
|
||||
FIND_PACKAGE(wxWidgets COMPONENTS core aui adv)
|
||||
find_package(wxWidgets COMPONENTS core aui adv)
|
||||
|
||||
if(_ARCH_32)
|
||||
add_definitions(-DwxSIZE_T_IS_UINT)
|
||||
|
@ -964,7 +957,7 @@ if(NOT DISABLE_WX)
|
|||
VERSION_EQUAL 2.8.2 OR "${DIST_NAME}" STREQUAL "natty")
|
||||
check_lib(GTK2 gtk+-2.0 gtk+-2.0 gtk.h REQUIRED)
|
||||
else()
|
||||
include(FindGTK2)
|
||||
find_package(GTK2)
|
||||
if(GTK2_FOUND)
|
||||
include_directories(${GTK2_INCLUDE_DIRS})
|
||||
list(APPEND LIBS ${GTK2_LIBRARIES})
|
||||
|
@ -1047,7 +1040,7 @@ include_directories("${PROJECT_BINARY_DIR}/Source/Core")
|
|||
########################################
|
||||
# Unit testing.
|
||||
#
|
||||
include(FindGTest)
|
||||
find_package(GTest)
|
||||
if(GTEST_FOUND AND USE_SHARED_GTEST)
|
||||
message("Using shared gtest")
|
||||
include_directories(${GTEST_INCLUDE_DIRS})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
include(FindPkgConfig OPTIONAL)
|
||||
find_package(PkgConfig)
|
||||
|
||||
macro(_internal_message msg)
|
||||
if(NOT ${_is_quiet})
|
||||
|
|
|
@ -114,7 +114,7 @@ endif()
|
|||
|
||||
set(DOLPHIN_EXE ${DOLPHIN_EXE_BASE})
|
||||
|
||||
include(FindGettext)
|
||||
find_package(Gettext)
|
||||
if(GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE AND wxWidgets_FOUND)
|
||||
file(GLOB LINGUAS ${CMAKE_SOURCE_DIR}/Languages/po/*.po)
|
||||
add_custom_target(translations ALL)
|
||||
|
|
Loading…
Reference in New Issue