Skip to content

Commit aa2a608

Browse files
committed
Missing DEFENITION when building static
1 parent 117df6b commit aa2a608

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,15 @@ endif()
398398
endif(BUNDLE_DEPENDENCIES)
399399

400400
if(WITH_TESTS)
401+
402+
if(NOT BUILD_SHARED_LIBS)
403+
set_property(
404+
DIRECTORY .
405+
APPEND PROPERTY COMPILE_DEFINITIONS
406+
CPPCONN_LIB_BUILD
407+
)
408+
endif()
409+
401410
add_subdirectory(test)
402411
add_subdirectory(examples)
403412
endif()

0 commit comments

Comments
 (0)