vcpkg/ports/openjpeg/fix-static.patch
Alexander Neumann 8da5d2b450
[OpenJPEG] Update to 2.5.0 (#24734)
* update openjpeg

* update openjpeg

* add arm patch and license

* reduce to version

* update db

* fix fastcgi to always use make

* remove from baseline

* openjpeg add tools feature

* vdb

* add supports statement. fastcgi uses stuff which only is allowed in desktop apps.

* format manfiest

* ver db

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2022-05-19 14:43:34 -07:00

60 lines
1.8 KiB
Diff

diff --git a/src/bin/jp2/CMakeLists.txt b/src/bin/jp2/CMakeLists.txt
index 4d4bd952f..e14b5a692 100644
--- a/src/bin/jp2/CMakeLists.txt
+++ b/src/bin/jp2/CMakeLists.txt
@@ -33,14 +33,6 @@ include_directories(
${TIFF_INCLUDE_DIRNAME}
)
-if(WIN32)
- if(BUILD_SHARED_LIBS)
- add_definitions(-DOPJ_EXPORTS)
- else()
- add_definitions(-DOPJ_STATIC)
- endif()
-endif()
-
# Loop over all executables:
foreach(exe opj_decompress opj_compress opj_dump)
add_executable(${exe} ${exe}.c ${common_SRCS})
diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
index ea4131a3e..dc63f49dd 100644
--- a/src/lib/openjp2/CMakeLists.txt
+++ b/src/lib/openjp2/CMakeLists.txt
@@ -84,12 +84,12 @@ endif()
# Build the library
if(WIN32)
+ add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
if(BUILD_SHARED_LIBS)
add_definitions(-DOPJ_EXPORTS)
else()
- add_definitions(-DOPJ_STATIC)
+ target_compile_definitions(${OPENJPEG_LIBRARY_NAME} PUBLIC OPJ_STATIC)
endif()
- add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME})
else()
if(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
diff --git a/src/lib/openjpip/CMakeLists.txt b/src/lib/openjpip/CMakeLists.txt
index b3cb8ce88..fc6a9dde3 100644
--- a/src/lib/openjpip/CMakeLists.txt
+++ b/src/lib/openjpip/CMakeLists.txt
@@ -52,14 +52,14 @@ set(LOCAL_SRCS
)
# Build the library
+add_library(openjpip ${OPENJPIP_SRCS} ${LOCAL_SRCS})
if(WIN32)
if(BUILD_SHARED_LIBS)
add_definitions(-DOPJ_EXPORTS)
else()
- add_definitions(-DOPJ_STATIC)
+ target_compile_definitions(openjpip PUBLIC OPJ_STATIC)
endif()
endif()
-add_library(openjpip ${OPENJPIP_SRCS} ${LOCAL_SRCS})
set_target_properties(openjpip
PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12")