Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--extern/libopenjpeg/CMakeLists.txt3
-rw-r--r--source/blender/imbuf/CMakeLists.txt2
3 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b68ef1c26a..01116eec429 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2320,9 +2320,10 @@ endif()
if(WITH_IMAGE_OPENJPEG)
if(WITH_SYSTEM_OPENJPEG)
# dealt with above
+ set(OPENJPEG_DEFINES "")
else()
set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg")
- add_definitions(-DOPJ_STATIC)
+ set(OPENJPEG_DEFINES "-DOPJ_STATIC")
endif()
endif()
diff --git a/extern/libopenjpeg/CMakeLists.txt b/extern/libopenjpeg/CMakeLists.txt
index c602ddcabb9..82eeb01b4d4 100644
--- a/extern/libopenjpeg/CMakeLists.txt
+++ b/extern/libopenjpeg/CMakeLists.txt
@@ -31,10 +31,13 @@ set(INC_SYS
)
+# TODO(sergey): Handle this via OPENJPEG_DEFINES
if(WIN32)
add_definitions(-DOPJ_STATIC)
endif()
+add_definitions(${OPENJPEG_DEFINES})
+
set(SRC
bio.c
cio.c
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt
index bdd8230a6ff..295a48dc245 100644
--- a/source/blender/imbuf/CMakeLists.txt
+++ b/source/blender/imbuf/CMakeLists.txt
@@ -120,7 +120,7 @@ if(WITH_IMAGE_OPENJPEG)
intern/jp2.c
)
- add_definitions(-DWITH_OPENJPEG)
+ add_definitions(-DWITH_OPENJPEG ${OPENJPEG_DEFINES})
endif()
if(WITH_IMAGE_REDCODE)