use wxWidget as external package
Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
@@ -1,16 +1,37 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(wx_wherigo)
|
||||
project(wx_wherigo LANGUAGES CXX)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(wxBUILD_SHARED OFF)
|
||||
|
||||
message(STATUS "Fetching wxWidgets...")
|
||||
|
||||
FetchContent_Declare(
|
||||
wxWidgets
|
||||
GIT_REPOSITORY https://github.com/wxWidgets/wxWidgets.git
|
||||
GIT_TAG v3.3.1
|
||||
GIT_SHALLOW ON
|
||||
)
|
||||
FetchContent_MakeAvailable(wxWidgets)
|
||||
|
||||
message(STATUS "Configure project....")
|
||||
|
||||
set(SRCS
|
||||
src/main.cpp
|
||||
src/MyFrame.cpp
|
||||
src/WxWherigo.cpp
|
||||
)
|
||||
|
||||
add_subdirectory(libs/wxWidgets-3.3.1)
|
||||
include_directories(include)
|
||||
add_executable(${PROJECT_NAME}
|
||||
src/main.cpp
|
||||
src/MyFrame.cpp
|
||||
src/WxWherigo.cpp
|
||||
)
|
||||
add_executable(${PROJECT_NAME} ${SRCS})
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
wx::net
|
||||
wx::core
|
||||
wx::base
|
||||
PRIVATE
|
||||
wxcore
|
||||
wxnet
|
||||
wxbase
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user