package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
588 B

3 years ago
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -1,5 +1,10 @@
add_executable(zfpcmd zfp.c)
-set_property(TARGET zfpcmd PROPERTY OUTPUT_NAME zfp)
+
+# protect against LNK1114: cannot overwrite the original file 'lib/Release/zfp.lib'; error code 32;
+# rationale: linker can't handle the case of an executable file having the same name as a library file
+if(NOT MSVC)
+ set_property(TARGET zfpcmd PROPERTY OUTPUT_NAME zfp)
+endif()
target_link_libraries(zfpcmd zfp)
if(HAVE_LIBM_MATH)
target_link_libraries(zfpcmd m)