mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-28 20:47:49 +01:00
wxwidgets source build
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(launcher)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||
|
||||
@@ -28,6 +30,8 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_link_options(-O3)
|
||||
endif ()
|
||||
|
||||
include(wxWidgets)
|
||||
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(backend)
|
||||
add_subdirectory(gui)
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
find_package(wxWidgets REQUIRED COMPONENTS base)
|
||||
if (wxWidgets_USE_FILE) # not defined in CONFIG mode
|
||||
include(${wxWidgets_USE_FILE})
|
||||
endif ()
|
||||
|
||||
add_library(backend
|
||||
src/DhfsInstance.cpp
|
||||
include_public/DhfsInstance.hpp
|
||||
|
||||
26
launcher/cmake/wxWidgets.cmake
Normal file
26
launcher/cmake/wxWidgets.cmake
Normal file
@@ -0,0 +1,26 @@
|
||||
# if linux
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
option(wxWidgets_IN_TREE_BUILD "Build wxWidgets in-tree" OFF)
|
||||
else ()
|
||||
option(wxWidgets_IN_TREE_BUILD "Build wxWidgets in-tree" ON)
|
||||
endif ()
|
||||
|
||||
if (wxWidgets_IN_TREE_BUILD)
|
||||
message(STATUS "Building wxWidgets in-tree")
|
||||
include(FetchContent)
|
||||
set(wxBUILD_SHARED OFF)
|
||||
FetchContent_Declare(wx
|
||||
GIT_REPOSITORY https://github.com/wxWidgets/wxWidgets.git
|
||||
GIT_TAG v3.2.8.1
|
||||
GIT_SHALLOW TRUE
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(wx)
|
||||
set(wxWidgets_LIBRARIES wx::core wx::base wx::webview wx::net)
|
||||
else ()
|
||||
message(STATUS "Using system wxWidgets")
|
||||
find_package(wxWidgets REQUIRED COMPONENTS net core base webview)
|
||||
if (wxWidgets_USE_FILE) # not defined in CONFIG mode
|
||||
include(${wxWidgets_USE_FILE})
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -1,9 +1,3 @@
|
||||
|
||||
find_package(wxWidgets REQUIRED COMPONENTS net core base webview)
|
||||
if (wxWidgets_USE_FILE) # not defined in CONFIG mode
|
||||
include(${wxWidgets_USE_FILE})
|
||||
endif ()
|
||||
|
||||
add_executable(launcher
|
||||
src/LauncherApp.cpp
|
||||
src/GLauncherApp.cpp
|
||||
|
||||
Reference in New Issue
Block a user