Remove EXV_HAVE_DLL and disable C4251 always on msvc.
This commit is contained in:
parent
307cb27d31
commit
e20329b8e0
@ -31,14 +31,9 @@
|
||||
#define HAVE_NTOHLL 1
|
||||
#endif
|
||||
|
||||
/* Disable warning 4251 from std templates about exporting interfaces */
|
||||
#ifdef EXV_HAVE_DLL
|
||||
#pragma warning( disable : 4251 )
|
||||
#endif
|
||||
|
||||
/* Disable warnings about 'deprecated' standard functions */
|
||||
#if _MSC_VER >= _MSC_VER_2005
|
||||
# pragma warning(disable : 4996)
|
||||
#pragma warning(disable : 4996) // Disable warnings about 'deprecated' standard functions
|
||||
#pragma warning(disable : 4251) // Disable warnings from std templates about exporting interfaces
|
||||
#endif
|
||||
|
||||
/* On Microsoft compilers pid_t has to be set to int. */
|
||||
|
||||
@ -94,12 +94,8 @@ add_executable(remotetest remotetest.cpp)
|
||||
list(APPEND APPLICATIONS remotetest)
|
||||
|
||||
# ******************************************************************************
|
||||
# set compiler -DEXV_HAVE_DLL when linking exiv2 dll
|
||||
foreach(application ${APPLICATIONS})
|
||||
target_link_libraries(${application} PRIVATE exiv2lib)
|
||||
if ( BUILD_SHARED_LIBS )
|
||||
target_compile_definitions(${application} PRIVATE EXV_HAVE_DLL )
|
||||
endif()
|
||||
if( EXIV2_ENABLE_PNG )
|
||||
target_link_libraries( ${application} PRIVATE ${ZLIB_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
@ -215,15 +215,10 @@ set_target_properties( exiv2lib_int PROPERTIES
|
||||
COMPILE_DEFINITIONS exiv2lib_STATIC
|
||||
)
|
||||
|
||||
target_compile_definitions(exiv2lib PRIVATE EXV_LOCALEDIR="${CMAKE_INSTALL_LOCALEDIR}" EXV_BUILDING_LIB )
|
||||
|
||||
if ( BUILD_SHARED_LIBS )
|
||||
target_compile_definitions(exiv2lib PRIVATE EXV_HAVE_DLL )
|
||||
endif()
|
||||
|
||||
if ( ${BUILD_SHARED_LIBS} )
|
||||
target_compile_definitions(exiv2lib PUBLIC EXV_HAVE_DLL)
|
||||
endif()
|
||||
target_compile_definitions(exiv2lib
|
||||
PUBLIC
|
||||
EXV_LOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}"
|
||||
)
|
||||
|
||||
if ( UNIX AND CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
|
||||
set (FREEBSD 1)
|
||||
@ -338,11 +333,7 @@ if(EXIV2_BUILD_EXIV2_COMMAND)
|
||||
XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Debug] "YES"
|
||||
)
|
||||
|
||||
target_compile_definitions(exiv2 PRIVATE EXV_LOCALEDIR="${CMAKE_INSTALL_LOCALEDIR}" )
|
||||
target_link_libraries( exiv2 PRIVATE exiv2lib )
|
||||
if ( BUILD_SHARED_LIBS )
|
||||
target_compile_definitions(exiv2 PRIVATE EXV_HAVE_DLL )
|
||||
endif()
|
||||
|
||||
# modify source lists to suit environment
|
||||
target_include_directories(exiv2 PRIVATE ${CMAKE_SOURCE_DIR}/include/)
|
||||
|
||||
@ -170,7 +170,7 @@ void Exiv2::dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys)
|
||||
int debug=0;
|
||||
#endif
|
||||
|
||||
#if defined(DLL_EXPORT) || defined(EXV_HAVE_DLL)
|
||||
#if defined(DLL_EXPORT)
|
||||
int dll=1;
|
||||
#else
|
||||
int dll=0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user