-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openjph: update to 0.10.2, drop 32-bit
- Loading branch information
Showing
2 changed files
with
84 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,156 +1,92 @@ | ||
--- OpenJPH-0.9.0/CMakeLists.txt.orig 2022-05-25 14:38:19.000000000 +0200 | ||
+++ OpenJPH-0.9.0/CMakeLists.txt 2024-01-04 14:44:47.955106100 +0100 | ||
@@ -1,11 +1,5 @@ | ||
cmake_minimum_required(VERSION 3.10.0) | ||
|
||
-project (openjph DESCRIPTION "Open source implementation of JPH" LANGUAGES CXX) | ||
- | ||
-################################################################################################ | ||
-# Building OpenJPH | ||
-################################################################################################ | ||
- | ||
############################################################ | ||
# Parse version file | ||
# credit: https://stackoverflow.com/a/47084079 | ||
@@ -25,6 +19,12 @@ | ||
set(OPENJPH_VERSION "${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}.${OPENJPH_VERSION_PATCH}") | ||
############################################################ | ||
|
||
+project (openjph VERSION ${OPENJPH_VERSION} DESCRIPTION "Open source implementation of JPH" LANGUAGES CXX) | ||
+ | ||
+################################################################################################ | ||
+# Building OpenJPH | ||
+################################################################################################ | ||
+ | ||
option(OJPH_DISABLE_INTEL_SIMD "Disables the use of SIMD instructions and associated files" OFF) | ||
option(BUILD_SHARED_LIBS "Shared Libraries" ON) | ||
option(OJPH_ENABLE_TIFF_SUPPORT "Enables input and output support for TIFF files" ON) | ||
@@ -51,17 +51,10 @@ | ||
endif() | ||
endif() | ||
|
||
-if (BUILD_SHARED_LIBS AND MSVC) | ||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D \"OJPH_BUILD_SHARED_LIBRARY\"") | ||
-endif() | ||
- | ||
if (OJPH_CODE_COVERAGE AND NOT MSVC) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") | ||
--- OpenJPH-0.10.2/CMakeLists.txt.orig 2024-01-06 22:52:52.000000000 +0100 | ||
+++ OpenJPH-0.10.2/CMakeLists.txt 2024-01-08 11:34:52.402267000 +0100 | ||
@@ -68,12 +68,6 @@ | ||
add_compile_options(-DOJPH_ENABLE_INTEL_AVX512) | ||
endif() | ||
|
||
-## specify output directories | ||
-## this will be refined further for Debug and Release builds in included CMakeLists.txt | ||
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin) | ||
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin) | ||
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../lib) | ||
- | ||
## Build library and applications | ||
add_subdirectory(src/core) | ||
if (OJPH_BUILD_EXECUTABLES) | ||
@@ -84,11 +78,6 @@ | ||
# Install | ||
################################################################################################ | ||
|
||
-set(PKG_CONFIG_INCLUDEDIR "\${prefix}/include") | ||
-set(PKG_CONFIG_LIBDIR "\${prefix}/lib") | ||
-set(PKG_CONFIG_LIBS "-L\${libdir} -lopenjph") | ||
-set(PKG_CONFIG_CFLAGS "-I\${includedir}") | ||
- | ||
include_directories(src/core/common) | ||
include_directories(src/apps/common) | ||
include(GNUInstallDirs) | ||
install(TARGETS openjph | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
@@ -96,13 +86,18 @@ | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
|
||
install(DIRECTORY src/core/common/ | ||
- DESTINATION include/openjph | ||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openjph | ||
FILES_MATCHING | ||
PATTERN "*.h") | ||
|
||
@@ -94,9 +87,14 @@ | ||
source_group("others" FILES ${OTHERS}) | ||
source_group("transform" FILES ${TRANSFORM}) | ||
install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc" | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) | ||
|
||
+set(PKG_CONFIG_INCLUDEDIR "\${prefix}/include") | ||
+set(PKG_CONFIG_LIBDIR "\${prefix}/lib") | ||
+set(PKG_CONFIG_INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") | ||
+set(PKG_CONFIG_LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}") | ||
+set(PKG_CONFIG_LIBS "-L\${libdir} -lopenjph") | ||
+set(PKG_CONFIG_CFLAGS "-I\${includedir}") | ||
+ | ||
configure_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/src/pkg-config.pc.cmake" | ||
- "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${PROJECT_NAME}.pc" | ||
+ "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc" | ||
) | ||
|
||
if(EMSCRIPTEN) | ||
@@ -125,8 +123,12 @@ | ||
|
||
target_compile_definitions(openjph PUBLIC _FILE_OFFSET_BITS=64) | ||
|
||
+if (BUILD_SHARED_LIBS AND WIN32) | ||
+ target_compile_definitions(openjph PRIVATE OJPH_BUILD_SHARED_LIBRARY) | ||
+endif() | ||
+ | ||
if (OPENJPH_VERSION) | ||
- if (WIN32) | ||
+ if (MSVC) | ||
set_target_properties(openjph | ||
PROPERTIES | ||
OUTPUT_NAME "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") | ||
@@ -160,7 +162,7 @@ | ||
############################################################ | ||
if( OJPH_ENABLE_TIFF_SUPPORT ) | ||
|
||
- if( WIN32 ) | ||
+ if( MSVC ) | ||
|
||
set(TIFF_INCLUDE_DIR "C:\\Program Files\\tiff\\include" CACHE PATH "the directory containing the TIFF headers") | ||
set(TIFF_LIBRARY_DEBUG "C:\\Program Files\\tiff\\lib\\tiffd.lib" CACHE FILEPATH "the path to the TIFF library for debug configurations") | ||
@@ -175,7 +177,7 @@ | ||
message( STATUS " TIFFXX_LIBRARY_DEBUG : \"${TIFFXX_LIBRARY_DEBUG}\" " ) | ||
message( STATUS " TIFFXX_LIBRARY_RELEASE : \"${TIFFXX_LIBRARY_RELEASE}\" " ) | ||
|
||
- endif( WIN32 ) | ||
+ endif( MSVC ) | ||
|
||
FIND_PACKAGE( TIFF ) | ||
|
||
@@ -205,8 +207,8 @@ | ||
list(APPEND OJPH_COMPRESS ${OJPH_IMG_IO_AVX2}) | ||
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc" | ||
@@ -116,4 +111,3 @@ | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif() | ||
- | ||
--- OpenJPH-0.10.2/src/apps/CMakeLists.txt.orig 2024-01-08 11:33:04.858155500 +0100 | ||
+++ OpenJPH-0.10.2/src/apps/CMakeLists.txt 2024-01-08 11:36:16.066877800 +0100 | ||
@@ -34,14 +34,6 @@ | ||
endif() | ||
############################################################ | ||
|
||
- ## Change folders | ||
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../bin) | ||
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../bin) | ||
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../lib) | ||
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../bin) | ||
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../bin) | ||
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../lib) | ||
- | ||
## Build executables | ||
add_subdirectory(ojph_expand) | ||
add_subdirectory(ojph_compress) | ||
--- OpenJPH-0.10.2/src/core/CMakeLists.txt.orig 2024-01-06 22:52:52.000000000 +0100 | ||
+++ OpenJPH-0.10.2/src/core/CMakeLists.txt 2024-01-08 11:38:08.421727800 +0100 | ||
@@ -1,11 +1,3 @@ | ||
- | ||
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../bin) | ||
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../bin) | ||
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../lib) | ||
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../bin) | ||
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../bin) | ||
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../lib) | ||
- | ||
include_directories(common) | ||
|
||
-add_executable(ojph_expand ${OJPH_EXPAND}) | ||
-add_executable(ojph_compress ${OJPH_COMPRESS}) | ||
+# add_executable(ojph_expand ${OJPH_EXPAND}) | ||
+# add_executable(ojph_compress ${OJPH_COMPRESS}) | ||
|
||
if (MSVC) | ||
set_source_files_properties(src/apps/others/ojph_img_io_avx2.cpp PROPERTIES COMPILE_FLAGS "/arch:AVX2") | ||
@@ -215,35 +217,37 @@ | ||
set_source_files_properties(src/apps/others/ojph_img_io_avx2.cpp PROPERTIES COMPILE_FLAGS -mavx2) | ||
file(GLOB CODESTREAM "codestream/*.cpp" "codestream/*.h") | ||
@@ -89,7 +89,7 @@ | ||
set_source_files_properties(transform/ojph_transform_avx2.cpp PROPERTIES COMPILE_FLAGS -mavx2) | ||
endif() | ||
|
||
-if( USE_TIFF ) | ||
- target_link_libraries(ojph_expand openjph ${TIFF_LIBRARIES}) | ||
- target_link_libraries(ojph_compress openjph ${TIFF_LIBRARIES}) | ||
-else() | ||
- target_link_libraries(ojph_expand openjph) | ||
- target_link_libraries(ojph_compress openjph) | ||
-endif() | ||
+# if( USE_TIFF ) | ||
+ # target_link_libraries(ojph_expand openjph ${TIFF_LIBRARIES}) | ||
+ # target_link_libraries(ojph_compress openjph ${TIFF_LIBRARIES}) | ||
+# else() | ||
+ # target_link_libraries(ojph_expand openjph) | ||
+ # target_link_libraries(ojph_compress openjph) | ||
+# endif() | ||
|
||
|
||
################################################################################################ | ||
# Install | ||
################################################################################################ | ||
|
||
-install(TARGETS ojph_expand | ||
- DESTINATION bin) | ||
+# install(TARGETS ojph_expand | ||
+ # DESTINATION bin) | ||
|
||
-install(TARGETS ojph_compress | ||
- DESTINATION bin) | ||
+# install(TARGETS ojph_compress | ||
+ # DESTINATION bin) | ||
|
||
include(GNUInstallDirs) | ||
-install(TARGETS openjph LIBRARY | ||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
+install(TARGETS openjph | ||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
|
||
install (DIRECTORY src/core/common/ | ||
DESTINATION include/openjph | ||
FILES_MATCHING | ||
PATTERN "*.h") | ||
|
||
-install(FILES "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${PROJECT_NAME}.pc" | ||
+install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc" | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) | ||
|
||
################################################################################################ | ||
-if (WIN32) | ||
+if (MSVC) | ||
set(OJPH_LIB_NAME_STRING "openjph.${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}") | ||
set_target_properties(openjph | ||
PROPERTIES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters