2019-05-29 07:58:00 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2021-06-10 07:33:25 +08:00
|
|
|
index dddbaf6..ee57b7b 100644
|
2019-05-29 07:58:00 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2021-06-10 07:33:25 +08:00
|
|
|
@@ -133,16 +133,28 @@ find_package(CMath REQUIRED)
|
|
|
|
# Release support
|
|
|
|
include(Release)
|
2019-05-29 07:58:00 +08:00
|
|
|
|
|
|
|
+if(MSVC)
|
2021-06-10 07:33:25 +08:00
|
|
|
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
|
|
|
|
+ add_compile_options(/wd4996)
|
|
|
|
+endif()
|
2019-05-29 07:58:00 +08:00
|
|
|
|
|
|
|
# Process subdirectories
|
|
|
|
add_subdirectory(port)
|
|
|
|
add_subdirectory(libtiff)
|
|
|
|
+if(BUILD_TOOLS)
|
2021-06-10 07:33:25 +08:00
|
|
|
add_subdirectory(tools)
|
2019-05-29 07:58:00 +08:00
|
|
|
+endif()
|
|
|
|
+if(BUILD_TESTS)
|
2021-06-10 07:33:25 +08:00
|
|
|
add_subdirectory(test)
|
2019-05-29 07:58:00 +08:00
|
|
|
+endif()
|
|
|
|
+if(BUILD_CONTRIB)
|
2021-06-10 07:33:25 +08:00
|
|
|
add_subdirectory(contrib)
|
|
|
|
add_subdirectory(build)
|
2019-05-29 07:58:00 +08:00
|
|
|
+endif()
|
|
|
|
+if(BUILD_DOCS)
|
2021-06-10 07:33:25 +08:00
|
|
|
add_subdirectory(man)
|
|
|
|
add_subdirectory(html)
|
2019-05-29 07:58:00 +08:00
|
|
|
+endif()
|
2021-06-10 07:33:25 +08:00
|
|
|
|
2019-05-29 07:58:00 +08:00
|
|
|
|
|
|
|
message(STATUS "")
|
|
|
|
diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt
|
2021-06-10 07:33:25 +08:00
|
|
|
index 90105b2..db5f140 100755
|
2019-05-29 07:58:00 +08:00
|
|
|
--- a/libtiff/CMakeLists.txt
|
|
|
|
+++ b/libtiff/CMakeLists.txt
|
2021-06-10 07:33:25 +08:00
|
|
|
@@ -161,7 +161,7 @@ if(CXX_SUPPORT)
|
|
|
|
set(tiffxx_HEADERS
|
|
|
|
tiffio.hxx)
|
|
|
|
|
|
|
|
- add_library(tiffxx)
|
|
|
|
+ add_library(tiffxx STATIC)
|
|
|
|
target_sources(tiffxx PRIVATE
|
|
|
|
${tiffxx_HEADERS}
|
|
|
|
tif_stream.cxx)
|
|
|
|
@@ -189,6 +189,7 @@ if(CXX_SUPPORT)
|
2019-05-29 07:58:00 +08:00
|
|
|
|
2021-06-10 07:33:25 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(NOT CMAKE_CROSSCOMPILING)
|
|
|
|
add_executable(mkg3states)
|
|
|
|
target_sources(mkg3states PRIVATE mkg3states.c tif_fax3.h)
|
|
|
|
target_link_libraries(mkg3states tiff port)
|
|
|
|
@@ -198,3 +199,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()
|