diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index b22a17db16..e06eff70f0 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -1,12 +1,13 @@
+if(WIN32)
+ set(UTF8_RESOURCE_OBJECT utf8.rc)
+endif(WIN32)
+
set(APP_SOURCES
exiv2.cpp
- exiv2app.hpp
actions.cpp
- actions.hpp
getopt.cpp
- getopt.hpp
app_utils.cpp
- app_utils.hpp
+ ${UTF8_RESOURCE_OBJECT}
)
add_executable(exiv2 ${APP_SOURCES})
@@ -16,6 +17,7 @@ target_include_directories(exiv2 PRIVATE ${PROJECT_SOURCE_DIR}/src) # To find i1
set_target_properties(exiv2 PROPERTIES COMPILE_FLAGS ${EXTRA_COMPILE_FLAGS} XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Debug] "YES")
if(MSVC)
set_target_properties(exiv2 PROPERTIES LINK_FLAGS "/ignore:4099") # Ignore missing PDBs
+ target_link_options(exiv2 PRIVATE /MANIFEST:NO) # Avoid linker fatal error CVT1100: duplicate resource
endif()
target_link_libraries(exiv2 PRIVATE exiv2lib)
diff --git a/app/utf8.manifest b/app/utf8.manifest
new file mode 100644
index 0000000000..f205604931
--- /dev/null
+++ b/app/utf8.manifest
@@ -0,0 +1,8 @@
+
+
+
+
+ UTF-8
+
+
+
\ No newline at end of file
diff --git a/app/utf8.rc b/app/utf8.rc
new file mode 100644
index 0000000000..b4cca2abbe
--- /dev/null
+++ b/app/utf8.rc
@@ -0,0 +1,3 @@
+#include
+
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "utf8.manifest"
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
index 249ba998dd..68625a9abf 100644
--- a/samples/CMakeLists.txt
+++ b/samples/CMakeLists.txt
@@ -32,11 +32,15 @@ set(SAMPLES
xmpdump.cpp
)
+if(WIN32)
+ set(UTF8_RESOURCE_OBJECT ${PROJECT_SOURCE_DIR}/app/utf8.rc)
+endif(WIN32)
+
#
# build samples AND add them to the APPLICATIONS list
foreach(entry ${SAMPLES})
string(REPLACE ".cpp" "" target ${entry})
- add_executable(${target} ${target}.cpp)
+ add_executable(${target} ${target}.cpp ${UTF8_RESOURCE_OBJECT})
set_target_properties(${target} PROPERTIES COMPILE_FLAGS ${EXTRA_COMPILE_FLAGS})
list(APPEND APPLICATIONS ${target})
target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/src) # To find enforce.hpp
@@ -116,6 +120,9 @@ foreach(application ${APPLICATIONS})
set_target_properties(${application} PROPERTIES LINK_FLAGS "/ignore:4099") # Ignore missing PDBs
endif()
endif()
+ if(MSVC)
+ target_link_options(${application} PRIVATE /MANIFEST:NO) # Avoid linker fatal error CVT1100: duplicate resource
+ endif()
endforeach()
# That's all Folks!