Adding MINGW32 toolchain support
This commit is contained in:
parent
7812043b7d
commit
28da26f174
@ -10,6 +10,14 @@ endif()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if(MINGW)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(REGX REQUIRED regex)
|
||||
if(REGX_FOUND)
|
||||
include_directories(${REGX_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( EXIV2_ENABLE_PNG )
|
||||
find_package( ZLIB REQUIRED )
|
||||
include_directories( ${ZLIB_INCLUDE_DIR} )
|
||||
|
||||
@ -261,6 +261,7 @@ else()
|
||||
|
||||
if (CYGWIN OR MINGW)
|
||||
target_link_libraries( exiv2lib PRIVATE psapi ws2_32 )
|
||||
target_link_libraries( exiv2lib PRIVATE ${REGX_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
target_link_libraries( exiv2lib PRIVATE Threads::Threads)
|
||||
@ -314,6 +315,11 @@ if(EXIV2_BUILD_EXIV2_COMMAND)
|
||||
if ( BUILD_SHARED_LIBS )
|
||||
target_compile_definitions(exiv2 PRIVATE EXV_HAVE_DLL )
|
||||
endif()
|
||||
|
||||
if (MINGW)
|
||||
target_link_libraries( exiv2 PRIVATE ${REGX_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
# modify source lists to suit environment
|
||||
|
||||
# TODO This should not be needed here! we need to fix the previous TODO
|
||||
|
||||
Loading…
Reference in New Issue
Block a user