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.ae
xiv2.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]
https://lists.osgeo.org/mailman/listinfo/tiff