get wxw3 building on linux
kind of hacky because currently, shared libpng is always expected to be used on darwin, libpng in externals is always used
This commit is contained in:
parent
20bb7a28b5
commit
6091774ade
|
@ -477,9 +477,6 @@ if(NOT DISABLE_WX)
|
|||
endif()
|
||||
endif(wxWidgets_FOUND)
|
||||
|
||||
if(wxWidgets_FOUND)
|
||||
include(${wxWidgets_USE_FILE})
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# There is a bug in the FindGTK module in cmake version 2.8.2 that
|
||||
# does not find gdk-pixbuf-2.0. On the other hand some 2.8.3
|
||||
|
@ -501,23 +498,30 @@ if(NOT DISABLE_WX)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(wxWidgets_FOUND)
|
||||
include(${wxWidgets_USE_FILE})
|
||||
message("wxWidgets found, enabling GUI build")
|
||||
else(wxWidgets_FOUND)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
message(FATAL_ERROR "wxWidgets not found. It is required to build the GUI")
|
||||
endif()
|
||||
message("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(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
add_definitions(-D__WXOSX_COCOA__)
|
||||
include_directories(Externals/wxWidgets3)
|
||||
include_directories(Externals/wxWidgets3/include)
|
||||
add_subdirectory(Externals/wxWidgets3)
|
||||
set(wxWidgets_LIBRARIES "wx")
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
add_definitions(-D__WXGTK__)
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
add_definitions(-D__WXMSW__)
|
||||
else()
|
||||
include_directories(Externals/wxWidgets/include)
|
||||
add_subdirectory(Externals/wxWidgets)
|
||||
message(FATAL_ERROR "wxWidgets in Externals is not compatible with your platform")
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
Externals/wxWidgets3
|
||||
Externals/wxWidgets3/include)
|
||||
add_subdirectory(Externals/wxWidgets3)
|
||||
set(wxWidgets_FOUND TRUE)
|
||||
set(wxWidgets_LIBRARIES "wx")
|
||||
endif(wxWidgets_FOUND)
|
||||
add_definitions(-DHAVE_WX=1)
|
||||
endif(NOT DISABLE_WX)
|
||||
|
|
|
@ -847,29 +847,16 @@ set(SRCS
|
|||
${SRCS_GENERIC})
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
add_definitions(-D__WXOSX_COCOA__)
|
||||
set(SRCS
|
||||
${SRCS}
|
||||
${SRCS_GENERICOSX}
|
||||
${SRCS_OSX}
|
||||
${SRCS_UNIX})
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(SRCS
|
||||
${SRCS}
|
||||
${SRCS_GENERICGTK}
|
||||
${SRCS_GTK}
|
||||
${SRCS_UNIX}
|
||||
${SRCS_UNIXGTK})
|
||||
else()
|
||||
set(SRCS
|
||||
${SRCS}
|
||||
${SRCS_MSW})
|
||||
endif()
|
||||
|
||||
add_definitions(-D__WXOSX_COCOA__)
|
||||
add_definitions(-DWXBUILDING)
|
||||
add_definitions(-Wno-deprecated-declarations)
|
||||
add_definitions(-Wno-shadow)
|
||||
include_directories(../libpng)
|
||||
add_subdirectory(../libpng ../libpng)
|
||||
set(LIBS
|
||||
png
|
||||
iconv
|
||||
${APPKIT_LIBRARY}
|
||||
${APPSERV_LIBRARY}
|
||||
|
@ -879,12 +866,26 @@ set(LIBS
|
|||
${COREFUND_LIBRARY}
|
||||
${CORESERV_LIBRARY}
|
||||
${IOK_LIBRARY}
|
||||
${QUICKTIME_LIBRARY}
|
||||
)
|
||||
${QUICKTIME_LIBRARY})
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
add_definitions(-D__WXGTK__)
|
||||
set(SRCS
|
||||
${SRCS}
|
||||
${SRCS_GENERICGTK}
|
||||
${SRCS_GTK}
|
||||
${SRCS_UNIX}
|
||||
${SRCS_UNIXGTK})
|
||||
else()
|
||||
add_definitions(-D__WXMSW__)
|
||||
set(SRCS
|
||||
${SRCS}
|
||||
${SRCS_MSW})
|
||||
endif()
|
||||
|
||||
include_directories(../libpng)
|
||||
add_subdirectory(../libpng ../libpng)
|
||||
list(APPEND LIBS png)
|
||||
add_definitions(-DWXBUILDING)
|
||||
add_definitions(-Wno-deprecated-declarations)
|
||||
add_definitions(-Wno-shadow)
|
||||
|
||||
add_library(wx STATIC ${SRCS})
|
||||
enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS)
|
||||
add_library(wx STATIC ${PNG_SRCS} ${SRCS})
|
||||
target_link_libraries(wx ${LIBS})
|
||||
|
|
Loading…
Reference in New Issue