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 8c1d38c..f76c817 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 803438c..6e51fb9 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 0f22daf..4981454 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 396bb3a..3c07fb3 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()