From 3dbc7c1969f44f141dc0a7aa0be4d6b8fffe2090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Tue, 3 Oct 2017 21:07:43 +0200 Subject: [PATCH] Fix compilation on Windows --- samples/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index b8d43821..12736bd7 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -77,6 +77,12 @@ if( EXPAT_FOUND ) add_executable( geotag geotag.cpp) list(APPEND APPLICATIONS geotag) target_link_libraries( geotag PRIVATE exiv2lib ${EXPAT_LIBRARIES}) + target_include_directories(geotag PRIVATE ${EXPAT_INCLUDE_DIR}) + + if (WIN32) + target_compile_definitions(geotag PRIVATE XML_STATIC) + endif() + install( TARGETS geotag RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif()