--- podofo-0.9.5/cmake/modules/FindLua51.cmake.orig	2017-09-28 08:15:38.510334800 +0300
+++ podofo-0.9.5/cmake/modules/FindLua51.cmake	2017-09-28 08:17:44.336545700 +0300
@@ -16,7 +16,7 @@
   PATHS
   $ENV{LUA_DIR}
   NO_DEFAULT_PATH
-  PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
+  PATH_SUFFIXES include include/lua include/lua53 include/lua5.3
 )
 
 FIND_PATH(LUA_INCLUDE_DIR lua.h
@@ -29,11 +29,11 @@
   /opt/local # DarwinPorts
   /opt/csw # Blastwave
   /opt
-  PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
+  PATH_SUFFIXES include include/lua include/lua53 include/lua5.3
 )
 
 FIND_LIBRARY(LUA_LIBRARY 
-  NAMES lua51 lua5.1 lua
+  NAMES lua lua5.3 lua53
   PATHS
   $ENV{LUA_DIR}
   NO_DEFAULT_PATH
@@ -41,7 +41,7 @@
 )
 
 FIND_LIBRARY(LUA_LIBRARY
-  NAMES lua51 lua5.1 lua
+  NAMES lua lua5.3 lua53
   PATHS
   ~/Library/Frameworks
   /Library/Frameworks
--- podofo-0.9.5/cmake/modules/FindZLIB.cmake.orig	2017-09-28 07:47:14.957813900 +0300
+++ podofo-0.9.5/cmake/modules/FindZLIB.cmake	2017-09-28 08:16:47.920535600 +0300
@@ -27,7 +27,7 @@
 
 ELSE(QT_QTCORE_LIBRARY AND USE_QT_ZLIB_PNGLIB)
 
-  SET(ZLIB_LIBRARY_NAMES_RELEASE ${ZLIB_LIBRARY_NAMES_RELEASE} ${ZLIB_LIBRARY_NAMES} zlib1 zlib zdll z)
+  SET(ZLIB_LIBRARY_NAMES_RELEASE ${ZLIB_LIBRARY_NAMES_RELEASE} ${ZLIB_LIBRARY_NAMES} z zlib1 zlib zdll)
   FIND_LIBRARY(ZLIB_LIBRARY_RELEASE NAMES ${ZLIB_LIBRARY_NAMES_RELEASE} )
 
   # Find a debug library if one exists and use that for debug builds.
--- podofo-0.9.5/cmake/modules/FindCppUnit.cmake.orig	2017-09-28 08:25:36.604027200 +0300
+++ podofo-0.9.5/cmake/modules/FindCppUnit.cmake	2017-09-28 08:29:40.835165300 +0300
@@ -23,19 +23,19 @@
     SET(CPPUNIT_INCLUDE_DIR)
     SET(CPPUNIT_LIBRARIES)
 
-    IF(CPPUNIT_CONFIG_EXECUTABLE)
-        EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_CFLAGS)
-        EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_LIBRARIES)
-        EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION)
+    IF(CPPUNIT_CONFIG_EXECUTABLE AND NOT WIN32)
+        EXECUTE_PROCESS(COMMAND ${CPPUNIT_CONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE CPPUNIT_CFLAGS)
+        EXECUTE_PROCESS(COMMAND ${CPPUNIT_CONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE CPPUNIT_LIBRARIES)
+        EXECUTE_PROCESS(COMMAND ${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION)
         STRING(REGEX REPLACE "-I(.+)" "\\1" CPPUNIT_CFLAGS "${CPPUNIT_CFLAGS}")
-    ELSE(CPPUNIT_CONFIG_EXECUTABLE)
+    ELSE(CPPUNIT_CONFIG_EXECUTABLE AND NOT WIN32)
         # in case win32 needs to find it the old way?
         FIND_PATH(CPPUNIT_CFLAGS cppunit/TestRunner.h PATHS /usr/include /usr/local/include )
         FIND_LIBRARY(CPPUNIT_LIBRARIES NAMES cppunit PATHS /usr/lib /usr/local/lib )
         # how can we find cppunit version?
         MESSAGE (STATUS "Ensure you cppunit installed version is at least ${CPPUNIT_MIN_VERSION}")
         SET (CPPUNIT_INSTALLED_VERSION ${CPPUNIT_MIN_VERSION})
-    ENDIF(CPPUNIT_CONFIG_EXECUTABLE)
+    ENDIF(CPPUNIT_CONFIG_EXECUTABLE AND NOT WIN32)
 
     SET(CPPUNIT_INCLUDE_DIR ${CPPUNIT_CFLAGS} "${CPPUNIT_CFLAGS}/cppunit")
 
@@ -49,8 +49,9 @@
     MESSAGE (STATUS "Found cppunit: ${CPPUNIT_LIBRARIES}")
   endif(NOT CppUnit_FIND_QUIETLY)
 
+  IF(NOT WIN32)
   IF(CPPUNIT_CONFIG_EXECUTABLE)
-    EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION)
+    EXECUTE_PROCESS(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION)
   ENDIF(CPPUNIT_CONFIG_EXECUTABLE)
 
   macro_ensure_version( ${CPPUNIT_MIN_VERSION} ${CPPUNIT_INSTALLED_VERSION} CPPUNIT_INSTALLED_VERSION_OK )
@@ -59,6 +60,7 @@
     MESSAGE ("** CppUnit version is too old: found ${CPPUNIT_INSTALLED_VERSION} installed, ${CPPUNIT_MIN_VERSION} or major is required")
     SET(CppUnit_FOUND FALSE)
   ENDIF(NOT CPPUNIT_INSTALLED_VERSION_OK)
+  ENDIF(NOT WIN32)
 
 ELSE(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
 
