mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 15:21:21 -06:00
Fixed #998
Added detection of gtk2/gtk3 GUI libraries required by Alien::wxWidgets. Added gtk2/gtk3 include paths, so we may call gtk2/3 API directly if needed for some workaround.
This commit is contained in:
parent
40b327eb11
commit
2fae893af2
3 changed files with 21 additions and 1 deletions
|
@ -8,6 +8,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/)
|
|||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Workaround for an old CMake, which does not understand CMAKE_CXX_STANDARD.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall" )
|
||||
find_package(PkgConfig REQUIRED)
|
||||
endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
|
||||
|
@ -579,6 +580,15 @@ if (SLIC3R_PRUSACONTROL)
|
|||
#add_compile_options(${AlienWx_CXX_FLAGS})
|
||||
add_definitions(${AlienWx_DEFINITIONS})
|
||||
set(wxWidgets_LIBRARIES ${AlienWx_LIBRARIES})
|
||||
# On Linux / gtk, we need to have a direct access to gtk+ for some workarounds.
|
||||
if (AlienWx_GUI_TOOLKIT STREQUAL "gtk2")
|
||||
pkg_check_modules(GTK2 gtk+-2.0)
|
||||
include_directories(${GTK2_INCLUDE_DIRS})
|
||||
endif()
|
||||
if (AlienWx_GUI_TOOLKIT STREQUAL "gtk3")
|
||||
pkg_check_modules(GTK3 gtk+-3.0)
|
||||
include_directories(${GTK3_INCLUDE_DIRS})
|
||||
endif()
|
||||
else ()
|
||||
find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl)
|
||||
include(${wxWidgets_USE_FILE})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue