Hi Jeff,

you seem using a very old version of CMake. I tried to fix the remaining 
issue, so it should also work with the older version.

Also I found 4 more deprecated uint32 - this is also included in the patch.

Thomas


-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/f666e026-174c-4451-8bef-74860bec8343n%40googlegroups.com.
 CMakeLists.txt | 23 +++++++++++++++++++----
 skyfill_tif.c  |  8 ++++----
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86b4da5..d68c543 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,10 @@
 # minimum cmake version
 cmake_minimum_required(VERSION 3.10)
 
-#cmake_policy(SET CMP0074 NEW)
+if(POLICY CMP0074)
+  # use new <PackageName>_ROOT in underlying FindPackages call
+  cmake_policy(SET CMP0074 NEW)
+endif()
 
 # now start with skyfill
 project(skyfill)
@@ -12,11 +15,23 @@ IF(WIN32)
     SET( CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/INSTALL/ CACHE FILEPATH "install prefix" FORCE)
 ENDIF()
 
+# getting install paths other systems
+include(GNUInstallDirs)
+
 # find all required packages
 # currently only libtiff is required
 FIND_PACKAGE(TIFF REQUIRED)
 INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})
-
+SET(NEEDED_LIBS ${TIFF_LIBRARIES})
+ 
+# check for libm
+include(CheckLibraryExists)
+# Does explicit linking against libm work?
+check_library_exists(m exp "" LIBMNEEDED)
+if(LIBMNEEDED)
+  list(APPEND NEEDED_LIBS "m")
+endif()
+ 
 
 # file list
 SET(SKYFILL_HEADER 
@@ -32,6 +47,6 @@ SET(SKYFILL_SOURCE
 
 # now create the executable
 add_executable(skyfill ${SKYFILL_HEADER} ${SKYFILL_SOURCE})
-target_link_libraries(skyfill ${TIFF_LIBRARIES} m)
+target_link_libraries(skyfill ${NEEDED_LIBS})
 
-#install(TARGETS skyfill)
+install(TARGETS skyfill RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/skyfill_tif.c b/skyfill_tif.c
index ce3423b..2f4da7b 100644
--- a/skyfill_tif.c
+++ b/skyfill_tif.c
@@ -4523,8 +4523,8 @@ int main(int argc, char* argv[])
 
 
     // make signed int values for width and height
-    h = (int32)input_H ;
-    w = (int32)input_W ;
+    h = (int32_t)input_H ;
+    w = (int32_t)input_W ;
 
     if(quick_test) {
 	h /= 2 ;
@@ -4534,8 +4534,8 @@ int main(int argc, char* argv[])
     min_sky_hue_mask = fmin_sky_hue_mask*w ;
     max_sky_hue_mask = fmax_sky_hue_mask*w ;
 
-    IMAGE_HEIGHT = (int32)h ; // set global variable
-    IMAGE_WIDTH = (int32)w ; // set global variable
+    IMAGE_HEIGHT = (int32_t)h ; // set global variable
+    IMAGE_WIDTH = (int32_t)w ; // set global variable
 
     p_half_image_width = 0.5 ;
     V_zenith= P3toV3(0., 1., 0.) ;

Reply via email to