From c56f915cc3ab43543efff504cb2406260a543004 Mon Sep 17 00:00:00 2001 From: Alexej Harm Date: Mon, 9 Sep 2019 14:56:01 +0200 Subject: [PATCH] fixed shared library support --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f7d84f..2d8462d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,9 @@ endif( ) if( BUILD_SHARED_LIBS ) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fPIC") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC") + if( WIN32 ) + target_compile_definitions( tz PRIVATE -DDATE_BUILD_DLL=1 PUBLIC -DDATE_USE_DLL=1 ) + endif( ) endif( ) target_link_libraries( tz ${CMAKE_THREAD_LIBS_INIT} ${OPTIONAL_LIBRARIES} )