diff options
Diffstat (limited to 'share/cmake-3.5/Modules/Platform/GNUtoMS_lib.cmake')
-rwxr-xr-x | share/cmake-3.5/Modules/Platform/GNUtoMS_lib.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/share/cmake-3.5/Modules/Platform/GNUtoMS_lib.cmake b/share/cmake-3.5/Modules/Platform/GNUtoMS_lib.cmake new file mode 100755 index 0000000..ca9b0f8 --- /dev/null +++ b/share/cmake-3.5/Modules/Platform/GNUtoMS_lib.cmake @@ -0,0 +1,10 @@ +# Usage: cmake -Dlib=lib.bat -Ddef=out.def -Ddll=out.dll -Dimp=out.dll.a -P GNUtoMS_lib.cmake +get_filename_component(name ${dll} NAME) # .dll file name +string(REGEX REPLACE "\\.dll\\.a$" ".lib" out "${imp}") # .dll.a -> .lib +execute_process( + COMMAND ${lib} /def:${def} /name:${name} /out:${out} + RESULT_VARIABLE res + ) +if(res) + message(FATAL_ERROR "lib failed: ${res}") +endif() |