Skip to content

Commit 218858d

Browse files
committed
Build dll for Windows
1 parent 3d601e3 commit 218858d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/version/CMakeLists.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if (NOT DEFINED CMAKE_BUILD_TYPE)
5757
set(CMAKE_BUILD_TYPE "Release")
5858
endif ()
5959

60-
if (NOT DEFINED BUILD_SHARED_LIBS AND NOT DEFINED WIN32)
60+
if (NOT DEFINED BUILD_SHARED_LIBS)
6161
set(BUILD_SHARED_LIBS ON)
6262
endif ()
6363

@@ -83,7 +83,8 @@ if (WIN32)
8383
endif ()
8484

8585
if (BUILD_SHARED_LIBS)
86-
add_definitions(-DWCDB_DLL -DWCDB_BUILD_DLL)
86+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
87+
#add_definitions(-DWCDB_DLL -DWCDB_BUILD_DLL)
8788
endif ()
8889

8990
add_compile_options(
@@ -94,6 +95,7 @@ if (WIN32)
9495
add_compile_options(/wd4068) # Disable unknown pragma warnings
9596
add_compile_options(/wd4996)
9697
add_compile_options(/wd4715)
98+
add_compile_options(/wd4251)
9799
else ()
98100
enable_language(C CXX)
99101
set(COMM_FLAGS_ "-Wall -g")

0 commit comments

Comments
 (0)