mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 07:39:26 +01:00
CMake: move wxWidgets check_lib code into wxWidgets
This commit is contained in:
parent
6197d9622f
commit
f4c0723387
@ -801,21 +801,6 @@ if(NOT DISABLE_WX)
|
||||
else()
|
||||
message(STATUS "Using static wxWidgets from Externals")
|
||||
|
||||
# These definitions and includes are used when building dolphin against wx,
|
||||
# not when building wx itself (see wxw3 CMakeLists.txt for that)
|
||||
if(APPLE)
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD")
|
||||
# Check for required libs
|
||||
check_lib(GTHREAD2 gthread-2.0 gthread-2.0 glib/gthread.h REQUIRED)
|
||||
check_lib(PANGOCAIRO pangocairo pangocairo pango/pangocairo.h REQUIRED)
|
||||
# On Linux "backtrace" is part of glibc. FreeBSD has a separate library.
|
||||
# Required for wxUSE_STACKWALKER in Externals/wxWidgets3/wx/wxgtk.h
|
||||
find_package(Backtrace REQUIRED)
|
||||
elseif(WIN32)
|
||||
else()
|
||||
message(FATAL_ERROR "wxWidgets in Externals is not compatible with your platform")
|
||||
endif()
|
||||
|
||||
include_directories(SYSTEM
|
||||
Externals/wxWidgets3
|
||||
Externals/wxWidgets3/include)
|
||||
|
13
Externals/wxWidgets3/CMakeLists.txt
vendored
13
Externals/wxWidgets3/CMakeLists.txt
vendored
@ -860,7 +860,14 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD")
|
||||
if (NOT X11_xf86vmode_FOUND OR NOT X11_Xinerama_FOUND)
|
||||
message(FATAL_ERROR "wxGTK2 needs Xinerama and Xxf86vm")
|
||||
endif()
|
||||
|
||||
find_package(GTK2 REQUIRED)
|
||||
check_lib(GTHREAD2 gthread-2.0 gthread-2.0 glib/gthread.h REQUIRED)
|
||||
check_lib(PANGOCAIRO pangocairo pangocairo pango/pangocairo.h REQUIRED)
|
||||
# On Linux "backtrace" is part of glibc. FreeBSD has a separate library.
|
||||
# Required for wxUSE_STACKWALKER in Externals/wxWidgets3/wx/wxgtk.h
|
||||
find_package(Backtrace REQUIRED)
|
||||
|
||||
target_include_directories(wx PUBLIC ${GTK2_INCLUDE_DIRS})
|
||||
target_link_libraries(wx PRIVATE
|
||||
png
|
||||
@ -872,7 +879,7 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD")
|
||||
${X11_Xxf86vm_LIB}
|
||||
${X11_Xinerama_LIB}
|
||||
)
|
||||
else()
|
||||
elseif(WIN32)
|
||||
remove_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
target_compile_definitions(wx PRIVATE "__WXMSW__" "NOPCH")
|
||||
target_sources(wx PRIVATE
|
||||
@ -880,9 +887,11 @@ else()
|
||||
${SRCS_MSW}
|
||||
)
|
||||
target_link_libraries(wx PRIVATE
|
||||
Comctl32.lib
|
||||
Comctl32.lib
|
||||
Rpcrt4.lib
|
||||
${OPENGL_LIBRARIES}
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "wxWidgets in Externals is not compatible with your platform")
|
||||
endif()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user