Hi Jeff, you missed some necessary changes in skyfill_tiff.c - see attached patch.
Also your changes to the CMake system breaks building on Windows: * The cmake policy was explicitly set to silence warning in underlying FindPackage(TIFF). * You commented out the install target. It does not install the files automatically. Instead it adds only an install target. So by default it does nothing. But it's nice to have it available to easier get access to the generated executables. * Never hardcode library names as with libm. You need to check it before usage. See attached second 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 hugin-ptx+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/d1377557-e32d-442d-a339-bbd2ba202553n%40googlegroups.com.
skyfill_tif.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skyfill_tif.c b/skyfill_tif.c index 9ac6c22..fa0b0fd 100644 --- a/skyfill_tif.c +++ b/skyfill_tif.c @@ -2310,9 +2310,9 @@ void repair_alpha(tdata_t *image) tif_get3c(image,x,y,r,g,b) ; // nearest neighbor search +/- 2 pixels to find max r,g,b in area - uint max_r=0 ; - uint max_g=0 ; - uint max_b=0 ; + uint16_t max_r=0 ; + uint16_t max_g=0 ; + uint16_t max_b=0 ; int x0 = x-2 ; if(x0 < 0) x0 = 0 ; int y0 = y-2 ; if(y0 < 0) y0 = 0 ; int x1 = x+2 ; if(x1 > IMAGE_WIDTH-1) x1 = IMAGE_WIDTH-1 ; @@ -4536,7 +4536,7 @@ int main(int argc, char* argv[]) exit(1) ; } /* fprintf(stderr, "y:%d * 2 (%d) > input height %d\n", y, y*2, input_H) ; */ - uint r,g,b,a ; + uint16_t r,g,b,a ; tif_get4c(image,x2,y2,r,g,b,a) ; tif_set4c(image,x,y,r,g,b,a) ; }
CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86b4da5..e6388fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,8 @@ # minimum cmake version cmake_minimum_required(VERSION 3.10) -#cmake_policy(SET CMP0074 NEW) +# use new <PackageName>_ROOT in underlying FindPackages call +cmake_policy(SET CMP0074 NEW) # now start with skyfill project(skyfill) @@ -16,7 +17,15 @@ ENDIF() # 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 +41,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)