Skip to content

Commit

Permalink
dll
Browse files Browse the repository at this point in the history
  • Loading branch information
zig-for committed Jul 3, 2023
1 parent 57fb0de commit de938fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.22)
cmake_policy(SET CMP0091 NEW)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
project(snfm)

set ( Protobuf_USE_STATIC_LIBS ON )
Expand All @@ -12,7 +12,7 @@ set(wxWidgets_USE_DEBUG OFF)
# Workaround issue where wxwidgets can't find a release only build with the above flag
message(STATUS "WXWIDGETS DIR " ${wxWidgets_LIB_DIR})
IF(CMAKE_BUILD_TYPE MATCHES "Release")
set(wxWidgets_LIB_DIR ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib)
set(wxWidgets_LIB_DIR ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib)
endif()
message(STATUS "new WXWIDGETS DIR " ${wxWidgets_LIB_DIR})
find_package(wxWidgets REQUIRED COMPONENTS core base)
Expand Down Expand Up @@ -110,6 +110,7 @@ target_link_libraries(manage_files PRIVATE ${wxWidgets_LIBRARIES})

if(WIN32)
# Magic bits to enable MFC
add_definitions(-D_AFXDLL)
set(CMAKE_MFC_FLAG 2)
set_target_properties(manage_files PROPERTIES WIN32_EXECUTABLE TRUE)
endif()
Expand Down
2 changes: 1 addition & 1 deletion triplets/x64-windows-static-release.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_BUILD_TYPE release)

0 comments on commit de938fe

Please sign in to comment.