pineapple/externals/vcpkg/ports/tiff/cmakelists.patch
2022-07-23 03:01:36 +02:00

59 lines
1.6 KiB
Diff
Executable file

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 770b0fac..df44e99e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,16 +131,28 @@ find_package(CMath REQUIRED)
# Release support
include(Release)
+if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
+ add_compile_options(/wd4996)
+endif()
# Process subdirectories
add_subdirectory(port)
add_subdirectory(libtiff)
+if(BUILD_TOOLS)
add_subdirectory(tools)
+endif()
+if(BUILD_TESTS)
add_subdirectory(test)
+endif()
+if(BUILD_CONTRIB)
add_subdirectory(contrib)
add_subdirectory(build)
+endif()
+if(BUILD_DOCS)
add_subdirectory(man)
add_subdirectory(html)
+endif()
# pkg-config support
include(PkgConfig)
diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt
index b6b31677..5c21e29f 100755
--- a/libtiff/CMakeLists.txt
+++ b/libtiff/CMakeLists.txt
@@ -189,7 +189,7 @@ if(CXX_SUPPORT)
set(tiffxx_HEADERS
tiffio.hxx)
- add_library(tiffxx ../placeholder.h)
+ add_library(tiffxx STATIC ../placeholder.h)
target_sources(tiffxx PRIVATE
${tiffxx_HEADERS}
tif_stream.cxx)
@@ -217,6 +217,7 @@ if(CXX_SUPPORT)
endif()
+if(NOT CMAKE_CROSSCOMPILING)
add_executable(mkg3states ../placeholder.h)
target_sources(mkg3states PRIVATE mkg3states.c tif_fax3.h)
target_link_libraries(mkg3states tiff port)
@@ -226,3 +227,4 @@ add_custom_target(faxtable
COMMAND ${CMAKE_COMMAND} -E rm "tif_fax3sm.c"
COMMAND mkg3states -b -c const "tif_fax3sm.c"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+endif()