From b44cec1892755e299b782cf7068f761f825b8973 Mon Sep 17 00:00:00 2001 From: dguittet Date: Wed, 15 May 2024 12:27:32 -0600 Subject: [PATCH] update ci.yml --- .github/workflows/ci.yml | 2 +- CMakeLists.txt | 36 ++++++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a8a3e9..26b5996 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: mkdir build cd build cmake -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_SYSTEM_VERSION=10.0 .. - Rename-Item "$env:WXMSW3\lib\vc14x_dll vc14x_x64_dll" + Rename-Item "$env:WXMSW3\lib\vc14x_dll" vc14x_x64_dll dir $env:WXMSW3\lib MSBuild.exe .\lk.sln /t:Build /p:Configuration=Release diff --git a/CMakeLists.txt b/CMakeLists.txt index 9460b34..b0de5ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,15 +88,16 @@ if (UNIX) find_package(wxWidgets REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) endif () else () - - # set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) - #find_package(wxWidgets REQUIRED qa webview aui richtext html propgrid adv net stc core base scintilla) + if(NOT EXISTS "$ENV{WXMSW3}/lib/wxwidgets.props") + set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) + find_package(wxWidgets REQUIRED qa webview aui richtext html propgrid adv net stc core base scintilla) + include(${wxWidgets_USE_FILE}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + endif() endif () -#include(${wxWidgets_USE_FILE}) -#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - ##################################################################################################################### # @@ -155,14 +156,21 @@ if (NOT SAM_SKIP_TOOLS) target_link_libraries(lk_sandbox lk) - - set_property( - TARGET lk_sandbox - PROPERTY VS_USER_PROPS "$ENV{WXMSW3}/wxwidgets.props" - ) + if (MSVC and EXISTS "$ENV{WXMSW3}/lib/wxwidgets.props") + set_property( + TARGET lk_sandbox + PROPERTY VS_USER_PROPS "$ENV{WXMSW3}/wxwidgets.props" + ) + else() + target_link_libraries(lk_sandbox ${wxWidgets_LIBRARIES}) + endif() endif() +if (MSVC and EXISTS "$ENV{WXMSW3}/lib/wxwidgets.props") set_property( - TARGET lk - PROPERTY VS_USER_PROPS "$ENV{WXMSW3}/wxwidgets.props" + TARGET lk + PROPERTY VS_USER_PROPS "$ENV{WXMSW3}/wxwidgets.props" ) +else() + target_link_libraries(lk ${wxWidgets_LIBRARIES}) +endif() \ No newline at end of file