mirror of
https://gitlab.com/libtiff/libtiff.git
synced 2026-01-18 13:41:17 +01:00
Fix build with CMake 3.10
This commit is contained in:
@@ -37,6 +37,7 @@ docfiles = \
|
||||
VERSION
|
||||
|
||||
EXTRA_DIST = \
|
||||
placeholder.h \
|
||||
cmake \
|
||||
CMakeLists.txt \
|
||||
HOWTO-RELEASE \
|
||||
|
||||
@@ -161,7 +161,7 @@ if(CXX_SUPPORT)
|
||||
set(tiffxx_HEADERS
|
||||
tiffio.hxx)
|
||||
|
||||
add_library(tiffxx)
|
||||
add_library(tiffxx ../placeholder.h)
|
||||
target_sources(tiffxx PRIVATE
|
||||
${tiffxx_HEADERS}
|
||||
tif_stream.cxx)
|
||||
@@ -189,7 +189,7 @@ if(CXX_SUPPORT)
|
||||
|
||||
endif()
|
||||
|
||||
add_executable(mkg3states)
|
||||
add_executable(mkg3states ../placeholder.h)
|
||||
target_sources(mkg3states PRIVATE mkg3states.c tif_fax3.h)
|
||||
target_link_libraries(mkg3states tiff port)
|
||||
|
||||
|
||||
6
placeholder.h
Normal file
6
placeholder.h
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* This file is intentionally empty.
|
||||
*
|
||||
* Before CMake 3.11, add_executable() and add_library() need
|
||||
* at least one source file.
|
||||
*/
|
||||
@@ -31,7 +31,7 @@ set(port_HEADERS libport.h)
|
||||
|
||||
# Only build if any needed features are missing
|
||||
if(NOT HAVE_GETOPT)
|
||||
add_library(port STATIC)
|
||||
add_library(port STATIC ../placeholder.h)
|
||||
|
||||
# Add getopt if missing
|
||||
if(NOT HAVE_GETOPT)
|
||||
|
||||
@@ -165,38 +165,38 @@ set(IMAGES_EXTRA_DIST
|
||||
|
||||
set(noinst_HEADERS tifftest.h)
|
||||
|
||||
add_executable(ascii_tag)
|
||||
add_executable(ascii_tag ../placeholder.h)
|
||||
target_sources(ascii_tag PRIVATE ascii_tag.c)
|
||||
target_link_libraries(ascii_tag PRIVATE tiff port)
|
||||
|
||||
add_executable(long_tag)
|
||||
add_executable(long_tag ../placeholder.h)
|
||||
target_sources(long_tag PRIVATE long_tag.c check_tag.c)
|
||||
target_link_libraries(long_tag PRIVATE tiff port)
|
||||
|
||||
add_executable(short_tag)
|
||||
add_executable(short_tag ../placeholder.h)
|
||||
target_sources(short_tag PRIVATE short_tag.c check_tag.c)
|
||||
target_link_libraries(short_tag PRIVATE tiff port)
|
||||
|
||||
add_executable(strip_rw)
|
||||
add_executable(strip_rw ../placeholder.h)
|
||||
target_sources(strip_rw PRIVATE strip_rw.c strip.c test_arrays.c test_arrays.h)
|
||||
target_link_libraries(strip_rw PRIVATE tiff port)
|
||||
|
||||
add_executable(rewrite)
|
||||
add_executable(rewrite ../placeholder.h)
|
||||
target_sources(rewrite PRIVATE rewrite_tag.c)
|
||||
target_link_libraries(rewrite PRIVATE tiff port)
|
||||
|
||||
if(JPEG_SUPPORT)
|
||||
add_executable(raw_decode)
|
||||
add_executable(raw_decode ../placeholder.h)
|
||||
target_sources(raw_decode PRIVATE raw_decode.c)
|
||||
target_link_libraries(raw_decode PRIVATE tiff port JPEG::JPEG)
|
||||
endif()
|
||||
|
||||
add_executable(custom_dir)
|
||||
add_executable(custom_dir ../placeholder.h)
|
||||
target_sources(custom_dir PRIVATE custom_dir.c)
|
||||
target_link_libraries(custom_dir PRIVATE tiff port)
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
add_executable(rational_precision2double)
|
||||
add_executable(rational_precision2double ../placeholder.h)
|
||||
target_sources(rational_precision2double PRIVATE rational_precision2double.c)
|
||||
target_link_libraries(rational_precision2double PRIVATE tiff port)
|
||||
add_test(NAME "rational_precision2double"
|
||||
@@ -204,22 +204,22 @@ add_test(NAME "rational_precision2double"
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
add_executable(custom_dir_EXIF_231)
|
||||
add_executable(custom_dir_EXIF_231 ../placeholder.h)
|
||||
target_sources(custom_dir_EXIF_231 PRIVATE custom_dir_EXIF_231.c)
|
||||
target_link_libraries(custom_dir_EXIF_231 PRIVATE tiff port)
|
||||
add_test(NAME "custom_dir_EXIF_231"
|
||||
COMMAND "custom_dir_EXIF_231")
|
||||
endif()
|
||||
|
||||
add_executable(defer_strile_loading)
|
||||
add_executable(defer_strile_loading ../placeholder.h)
|
||||
target_sources(defer_strile_loading PRIVATE defer_strile_loading.c)
|
||||
target_link_libraries(defer_strile_loading PRIVATE tiff port)
|
||||
|
||||
add_executable(defer_strile_writing)
|
||||
add_executable(defer_strile_writing ../placeholder.h)
|
||||
target_sources(defer_strile_writing PRIVATE defer_strile_writing.c)
|
||||
target_link_libraries(defer_strile_writing PRIVATE tiff port)
|
||||
|
||||
add_executable(testtypes)
|
||||
add_executable(testtypes ../placeholder.h)
|
||||
target_sources(testtypes PRIVATE testtypes.c)
|
||||
target_link_libraries(testtypes PRIVATE tiff port)
|
||||
|
||||
|
||||
@@ -22,83 +22,83 @@
|
||||
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
# OF THIS SOFTWARE.
|
||||
|
||||
add_executable(fax2ps)
|
||||
add_executable(fax2ps ../placeholder.h)
|
||||
target_sources(fax2ps PRIVATE fax2ps.c)
|
||||
target_link_libraries(fax2ps PRIVATE tiff port)
|
||||
|
||||
add_executable(fax2tiff)
|
||||
add_executable(fax2tiff ../placeholder.h)
|
||||
target_sources(fax2tiff PRIVATE fax2tiff.c)
|
||||
target_link_libraries(fax2tiff PRIVATE tiff port)
|
||||
|
||||
add_executable(pal2rgb)
|
||||
add_executable(pal2rgb ../placeholder.h)
|
||||
target_sources(pal2rgb PRIVATE pal2rgb.c)
|
||||
target_link_libraries(pal2rgb PRIVATE tiff port)
|
||||
|
||||
add_executable(ppm2tiff)
|
||||
add_executable(ppm2tiff ../placeholder.h)
|
||||
target_sources(ppm2tiff PRIVATE ppm2tiff.c)
|
||||
target_link_libraries(ppm2tiff PRIVATE tiff port)
|
||||
|
||||
add_executable(raw2tiff)
|
||||
add_executable(raw2tiff ../placeholder.h)
|
||||
target_sources(raw2tiff PRIVATE raw2tiff.c)
|
||||
target_link_libraries(raw2tiff PRIVATE tiff port CMath::CMath)
|
||||
|
||||
add_executable(rgb2ycbcr)
|
||||
add_executable(rgb2ycbcr ../placeholder.h)
|
||||
target_sources(rgb2ycbcr PRIVATE rgb2ycbcr.c)
|
||||
target_link_libraries(rgb2ycbcr PRIVATE tiff port)
|
||||
|
||||
add_executable(thumbnail)
|
||||
add_executable(thumbnail ../placeholder.h)
|
||||
target_sources(thumbnail PRIVATE thumbnail.c)
|
||||
target_link_libraries(thumbnail PRIVATE tiff port CMath::CMath)
|
||||
|
||||
add_executable(tiff2bw)
|
||||
add_executable(tiff2bw ../placeholder.h)
|
||||
target_sources(tiff2bw PRIVATE tiff2bw.c)
|
||||
target_link_libraries(tiff2bw PRIVATE tiff port)
|
||||
|
||||
add_executable(tiff2pdf)
|
||||
add_executable(tiff2pdf ../placeholder.h)
|
||||
target_sources(tiff2pdf PRIVATE tiff2pdf.c)
|
||||
target_link_libraries(tiff2pdf PRIVATE tiff port)
|
||||
|
||||
add_executable(tiff2ps)
|
||||
add_executable(tiff2ps ../placeholder.h)
|
||||
target_sources(tiff2ps PRIVATE tiff2ps.c)
|
||||
target_link_libraries(tiff2ps PRIVATE tiff port CMath::CMath)
|
||||
|
||||
add_executable(tiff2rgba)
|
||||
add_executable(tiff2rgba ../placeholder.h)
|
||||
target_sources(tiff2rgba PRIVATE tiff2rgba.c)
|
||||
target_link_libraries(tiff2rgba PRIVATE tiff port)
|
||||
|
||||
add_executable(tiffcmp)
|
||||
add_executable(tiffcmp ../placeholder.h)
|
||||
target_sources(tiffcmp PRIVATE tiffcmp.c)
|
||||
target_link_libraries(tiffcmp PRIVATE tiff port)
|
||||
|
||||
add_executable(tiffcp)
|
||||
add_executable(tiffcp ../placeholder.h)
|
||||
target_sources(tiffcp PRIVATE tiffcp.c)
|
||||
target_link_libraries(tiffcp PRIVATE tiff port)
|
||||
|
||||
add_executable(tiffcrop)
|
||||
add_executable(tiffcrop ../placeholder.h)
|
||||
target_sources(tiffcrop PRIVATE tiffcrop.c)
|
||||
target_link_libraries(tiffcrop PRIVATE tiff port CMath::CMath)
|
||||
|
||||
add_executable(tiffdither)
|
||||
add_executable(tiffdither ../placeholder.h)
|
||||
target_sources(tiffdither PRIVATE tiffdither.c)
|
||||
target_link_libraries(tiffdither PRIVATE tiff port)
|
||||
|
||||
add_executable(tiffdump)
|
||||
add_executable(tiffdump ../placeholder.h)
|
||||
target_sources(tiffdump PRIVATE tiffdump.c)
|
||||
target_link_libraries(tiffdump PRIVATE tiff port)
|
||||
|
||||
add_executable(tiffinfo)
|
||||
add_executable(tiffinfo ../placeholder.h)
|
||||
target_sources(tiffinfo PRIVATE tiffinfo.c)
|
||||
target_link_libraries(tiffinfo PRIVATE tiff port)
|
||||
|
||||
add_executable(tiffmedian)
|
||||
add_executable(tiffmedian ../placeholder.h)
|
||||
target_sources(tiffmedian PRIVATE tiffmedian.c)
|
||||
target_link_libraries(tiffmedian PRIVATE tiff port)
|
||||
|
||||
add_executable(tiffset)
|
||||
add_executable(tiffset ../placeholder.h)
|
||||
target_sources(tiffset PRIVATE tiffset.c)
|
||||
target_link_libraries(tiffset PRIVATE tiff port)
|
||||
|
||||
add_executable(tiffsplit)
|
||||
add_executable(tiffsplit ../placeholder.h)
|
||||
target_sources(tiffsplit PRIVATE tiffsplit.c)
|
||||
target_link_libraries(tiffsplit PRIVATE tiff port)
|
||||
|
||||
@@ -125,7 +125,7 @@ install(TARGETS fax2ps
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
|
||||
|
||||
if(HAVE_OPENGL)
|
||||
add_executable(tiffgt)
|
||||
add_executable(tiffgt ../placeholder.h)
|
||||
target_sources(tiffgt PRIVATE tiffgt.c)
|
||||
target_link_libraries(tiffgt PRIVATE tiff port)
|
||||
target_link_libraries(tiffgt PRIVATE OpenGL::GL GLUT::GLUT)
|
||||
|
||||
Reference in New Issue
Block a user