Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

modify cmake for windows

shun-iwasawa4ef842ba4ab1
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt
index 43a8c7867..bd6cf3b3a 100644
--- a/toonz/sources/CMakeLists.txt
+++ b/toonz/sources/CMakeLists.txt
@@ -149,15 +149,15 @@ endif()
if(BUILD_ENV_MSVC)
# configure the third party libs (only once) to avoid manual copies
message(STATUS "configure the third party libs")
- if(NOT "${SDKROOT}/libpng-1.6.21")
+ if(NOT EXISTS"${SDKROOT}/libpng-1.6.21")
file(COPY "${SDKROOT}/libpng-1.6.21/scripts/pnglibconf.h.prebuilt" DESTINATION "${SDKROOT}/libpng-1.6.21")
file(RENAME "${SDKROOT}/libpng-1.6.21/pnglibconf.h.prebuilt" "${SDKROOT}/libpng-1.6.21/pnglibconf.h")
endif()
- if(NOT "${SDKROOT}/tiff-4.0.3/libtiff/tif_config.h")
- file(RENAME "${SDKROOT}/tiff-4.0.3/libtiff/tif_config.vc.h" "${SDKROOT}/tiff-4.0.3/libtiff/tif_config.h")
+ if(NOT EXISTS "${SDKROOT}/tiff-4.0.3/libtiff/tif_config.h")
+ file(COPY_FILE "${SDKROOT}/tiff-4.0.3/libtiff/tif_config.vc.h" "${SDKROOT}/tiff-4.0.3/libtiff/tif_config.h")
endif()
- if(NOT "${SDKROOT}/tiff-4.0.3/libtiff/tiffconf.h")
- file(RENAME "${SDKROOT}/tiff-4.0.3/libtiff/tiffconf.vc.h" "${SDKROOT}/tiff-4.0.3/libtiff/tiffconf.h")
+ if(NOT EXISTS "${SDKROOT}/tiff-4.0.3/libtiff/tiffconf.h")
+ file(COPY_FILE "${SDKROOT}/tiff-4.0.3/libtiff/tiffconf.vc.h" "${SDKROOT}/tiff-4.0.3/libtiff/tiffconf.h")
endif()
endif()