Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit eee48b8

Browse files
committed
cmake: fix linking issue for windows
1 parent e6c65b1 commit eee48b8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nitro_deps/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,14 @@ ExternalProject_Add(
8585
GIT_REPOSITORY https://github.com/google/googletest
8686
GIT_TAG v1.14.0
8787
CMAKE_ARGS
88+
-Dgtest_force_shared_crt=ON
8889
-DCMAKE_BUILD_TYPE=release
8990
-DCMAKE_PREFIX_PATH=${THIRD_PARTY_INSTALL_PATH}
9091
-DCMAKE_INSTALL_PREFIX=${THIRD_PARTY_INSTALL_PATH}
9192
)
9293

9394

9495
if(WIN32)
95-
# Fix dynamic link for gtest
96-
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
97-
9896
# Fix trantor cmakelists to link c-ares on Windows
9997
set(TRANTOR_CMAKE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../build_deps/nitro_deps/drogon-prefix/src/drogon/trantor/CMakeLists.txt)
10098
ExternalProject_Add_Step(drogon trantor_custom_target

test/components/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
file(GLOB SRCS *.cc)
22
project(test-components)
33

4+
enable_testing()
5+
46
add_executable(${PROJECT_NAME} ${SRCS})
57

68
find_package(Drogon CONFIG REQUIRED)

0 commit comments

Comments
 (0)