Build environment: fixes for Linux debug libraries build.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 14 Jan 2019 14:09:48 +0000 (15:09 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 14 Jan 2019 14:57:53 +0000 (15:57 +0100)
build_files/build_environment/CMakeLists.txt
build_files/build_environment/cmake/png.cmake
build_files/build_environment/cmake/tiff.cmake
build_files/build_environment/cmake/zlib.cmake

index 8c1d38c06358fec07145f16669178cc2e1a2493c..f76c8175e5090fdaa81fdb947361f7da2ec14a9b 100644 (file)
@@ -114,7 +114,7 @@ endif()
 
 if(NOT WIN32 OR ENABLE_MINGW64)
        include(cmake/openjpeg.cmake)
-       if(BUILD_MODE STREQUAL Release)
+       if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
                if(WIN32)
                        include(cmake/zlib_mingw.cmake)
                endif()
index 803438cbd2a61a2ffce5f96d8e0a173644b0a7c9..6e51fb9ebe4ad7ef94f55f2b3990edcf63b68c63 100644 (file)
@@ -36,7 +36,7 @@ add_dependencies(
        external_zlib
 )
 
-if(BUILD_MODE STREQUAL Debug)
+if(WIN32 AND BUILD_MODE STREQUAL Debug)
        ExternalProject_Add_Step(external_png after_install
                COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
                DEPENDEES install
index 0f22daf05b1fe0215c9dc2cc44ead8ef8914b128..498145463cfb97a665573ca732fb95fbf958b871 100644 (file)
@@ -39,7 +39,7 @@ add_dependencies(
        external_zlib
 )
 
-if(BUILD_MODE STREQUAL Debug)
+if(WIN32 AND BUILD_MODE STREQUAL Debug)
        ExternalProject_Add_Step(external_tiff after_install
                COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
                DEPENDEES install
index 396bb3a318e03045f8a34ebf5d61021dd6113593..3c07fb3c08a3b21b5067775ac425f6312f715c67 100644 (file)
@@ -40,16 +40,8 @@ if (WIN32)
                )
        endif()
 else()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_zlib after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-                       DEPENDEES install
-               )
-       endif()
-       if (UNIX)
-               ExternalProject_Add_Step(external_zlib after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
-                       DEPENDEES install
-               )
-       endif()
+       ExternalProject_Add_Step(external_zlib after_install
+               COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
+               DEPENDEES install
+       )
 endif()