The target was Linux, not Windows 

 

David

 

From: Bob Friesenhahn <[email protected]> 
Sent: 09 November 2024 19:03
To: David C. Partridge <[email protected]>
Subject: Re: [Tiff] Question about linking with libtiff

 

If your target is WIN32 (you did not say what target you are building for), 
then I see logic in the cmake text you sent which specifically adds "libtiff".

Bob

On Nov 9, 2024, at 11:17 AM, "David C. Partridge via Tiff" 
<[email protected] <mailto:[email protected]> > wrote:

I’m not explicitly specifying libtiff as a dependency in the CMakeLists.txt for 
my project.

################################################################################

# Dependencies

################################################################################

# Link with other targets.

target_link_libraries(DeepSkyStacker PRIVATE

    Qt6::Core

    Qt6::Widgets

    Qt6::Network

               DeepSkyStackerKernel

    libraw

    ZClass

)

if(WIN32)

target_link_libraries(DeepSkyStacker PRIVATE

    libtiff

)

message (FATAL_ERROR "WIN32 add libtiff" )

endif()

 

if(WIN32)

set(DEBUG_DEPENDENCIES exiv2d zlibstaticd cfitsio)

set(RELEASE_DEPENDENCIES exiv2 zlibstatic cfitsio)

else()

set(DEBUG_DEPENDENCIES tiff.a exiv2.a expat.a z.a cfitsio.a)

set(RELEASE_DEPENDENCIES tiff.a exiv2.a expat.a z.a cfitsio.a)

endif()

 

set(ADDITIONAL_LIBRARY_DEPENDENCIES

    "$<$<CONFIG:Debug>:${DEBUG_DEPENDENCIES}>"

    "$<$<CONFIG:Release>:${RELEASE_DEPENDENCIES}>"

)

 

if(WIN32)

set(ADDITIONAL_LIBRARY_DEPENDENCIES ${ADDITIONAL_LIBRARY_DEPENDENCIES}

    user32

    psapi

    htmlhelp

)

endif()

 

target_link_libraries(${PROJECT_NAME} PRIVATE 
"${ADDITIONAL_LIBRARY_DEPENDENCIES}")

get_target_property(OUT ${PROJECT_NAME} LINK_LIBRARIES)

message(STATUS "Link libraries: " ${OUT})

and the configure step outputs this:

1> [CMake] Configuring project: DeepSkyStacker

1> [CMake] -- Link libraries: 
Qt6::CoreQt6::CoreQt6::WidgetsQt6::NetworkDeepSkyStackerKernellibrawZClass$<$<CONFIG:Debug>:tiff.aexiv2.aexpat.az.acfitsio.a>$<$<CONFIG:Release>:tiff.aexiv2.aexpat.az.acfitsio.a>

 

Which looks correct to me.  But when I get to the link step of my build, the 
critical part of the link command reads:

-Bstatic  -ltiff  -lexiv2  -lexpat  -lz  -lcfitsio  … stuff deleted …   
-llibtiff

So where is that -llibtiff coming from?? Is there something in the headers that 
could cause that?

 

Thanks, David

 

 



  _____  


Tiff mailing list
[email protected] <mailto:[email protected]> 
https://lists.osgeo.org/mailman/listinfo/tiff

_______________________________________________
Tiff mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/tiff

Reply via email to