fixed shared library support

This commit is contained in:
Alexej Harm
2019-09-09 14:56:01 +02:00
committed by Howard Hinnant
parent 5e57a19abe
commit c56f915cc3

View File

@@ -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} )