Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Kral <vojtech@kral.hk>2019-01-07 16:00:38 +0300
committerVojtech Kral <vojtech@kral.hk>2019-01-07 19:25:12 +0300
commit39c0e80ce8ca65beb473f9beee45fd72c95509f6 (patch)
tree804e80cf65554c290ea769ac413b9da063327020 /deps/deps-windows.cmake
parent8bc8dfaba4abdb88e64379bbb4d3527d87a5ac82 (diff)
deps: Fix libpng and zlib on Windows
Diffstat (limited to 'deps/deps-windows.cmake')
-rw-r--r--deps/deps-windows.cmake31
1 files changed, 30 insertions, 1 deletions
diff --git a/deps/deps-windows.cmake b/deps/deps-windows.cmake
index d49434ecb..17dfae8bd 100644
--- a/deps/deps-windows.cmake
+++ b/deps/deps-windows.cmake
@@ -121,7 +121,8 @@ ExternalProject_Add(dep_zlib
URL_HASH SHA256=4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066
CMAKE_GENERATOR "${DEP_MSVC_GEN}"
CMAKE_ARGS
- "-DINSTALL_BIN_DIR=${CMAKE_CURRENT_BINARY_DIR}\\fallout" # I found no better way of preventing zlib creating & installing DLLs :-/
+ -DSKIP_INSTALL_FILES=ON # Prevent installation of man pages et al.
+ "-DINSTALL_BIN_DIR=${CMAKE_CURRENT_BINARY_DIR}\\fallout" # I found no better way of preventing zlib from creating & installing DLLs :-/
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
"-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local"
BUILD_COMMAND msbuild /P:Configuration=Release INSTALL.vcxproj
@@ -136,6 +137,19 @@ if (${DEP_DEBUG})
WORKING_DIRECTORY "${BINARY_DIR}"
)
endif ()
+# The following steps are unfortunately needed to remove the _static suffix on libraries
+ExternalProject_Add_Step(dep_zlib fix_static
+ DEPENDEES install
+ COMMAND "${CMAKE_COMMAND}" -E rename zlibstatic.lib zlib.lib
+ WORKING_DIRECTORY "${DESTDIR}\\usr\\local\\lib\\"
+)
+if (${DEP_DEBUG})
+ ExternalProject_Add_Step(dep_zlib fix_static_debug
+ DEPENDEES install
+ COMMAND "${CMAKE_COMMAND}" -E rename zlibstaticd.lib zlibd.lib
+ WORKING_DIRECTORY "${DESTDIR}\\usr\\local\\lib\\"
+ )
+endif ()
ExternalProject_Add(dep_libpng
@@ -147,6 +161,7 @@ ExternalProject_Add(dep_libpng
CMAKE_ARGS
-DPNG_SHARED=OFF
-DPNG_TESTS=OFF
+ -DSKIP_INSTALL_FILES=ON # Prevent installation of man pages et al.
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
"-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local"
BUILD_COMMAND msbuild /P:Configuration=Release INSTALL.vcxproj
@@ -161,6 +176,20 @@ if (${DEP_DEBUG})
WORKING_DIRECTORY "${BINARY_DIR}"
)
endif ()
+# The following steps are unfortunately needed to remove the _static suffix on libraries
+# (And also overwrite the dynamic .lib)
+ExternalProject_Add_Step(dep_libpng fix_static
+ DEPENDEES install
+ COMMAND "${CMAKE_COMMAND}" -E rename libpng16_static.lib libpng16.lib
+ WORKING_DIRECTORY "${DESTDIR}\\usr\\local\\lib\\"
+)
+if (${DEP_DEBUG})
+ ExternalProject_Add_Step(dep_libpng fix_static_debug
+ DEPENDEES install
+ COMMAND "${CMAKE_COMMAND}" -E rename libpng16_staticd.lib libpng16d.lib
+ WORKING_DIRECTORY "${DESTDIR}\\usr\\local\\lib\\"
+ )
+endif ()
if (${DEPS_BITS} EQUAL 32)