CMakeLists: link to static libraries.

This commit is contained in:
Guillaume Jacquemin 2020-06-20 11:35:23 +02:00
parent 3841e82dc9
commit 3c34b7cdac

View file

@ -22,6 +22,7 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON) set(CMAKE_CXX_EXTENSIONS ON)
set(BUILD_STATIC ON CACHE BOOL "" FORCE)
set(WITH_INTERCONNECT OFF CACHE BOOL "" FORCE) set(WITH_INTERCONNECT OFF CACHE BOOL "" FORCE)
set(WITH_PLUGINMANAGER OFF CACHE BOOL "" FORCE) set(WITH_PLUGINMANAGER OFF CACHE BOOL "" FORCE)
set(WITH_TESTSUITE OFF CACHE BOOL "" FORCE) set(WITH_TESTSUITE OFF CACHE BOOL "" FORCE)
@ -29,7 +30,7 @@ add_subdirectory(corrade)
find_package(Corrade REQUIRED Containers Utility) find_package(Corrade REQUIRED Containers Utility)
include_directories(SYSTEM "C:/msys64/mingw64/lib/wx/include/msw-unicode-3.0") include_directories(SYSTEM "C:/msys64/mingw64/lib/wx/include/msw-unicode-static-3.0")
include_directories(SYSTEM "C:/msys64/mingw64/include/wx-3.0") include_directories(SYSTEM "C:/msys64/mingw64/include/wx-3.0")
set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON) set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
@ -50,10 +51,35 @@ add_executable(wxMASSManager WIN32
MassManager/MassManager.cpp MassManager/MassManager.cpp
resource.rc) resource.rc)
target_compile_options(wxMASSManager PRIVATE -D_FILE_OFFSET_BITS=64 -D__WXMSW__ -fpermissive)
target_link_options(wxMASSManager PRIVATE -static -static-libgcc -static-libstdc++ -pipe -Wl,--subsystem,windows -mwindows)
target_link_libraries(wxMASSManager PRIVATE target_link_libraries(wxMASSManager PRIVATE
Corrade::Containers Corrade::Containers
Corrade::Utility Corrade::Utility
wx_baseu-3.0
wx_mswu_core-3.0
wx_mswu_adv-3.0 wx_mswu_adv-3.0
wx_mswu_core-3.0
wx_baseu-3.0
wxregexu-3.0
wxexpat-3.0
wxtiff-3.0
wxjpeg-3.0
wxpng-3.0
wxzlib-3.0
rpcrt4
oleaut32
ole32
uuid
lzma
jbig
winspool
winmm
shell32
comctl32
comdlg32
advapi32
wsock32
gdi32
oleacc
wtsapi32) wtsapi32)