From a712459603be05fd3c25c12f7153755160259f54 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 17 Sep 2015 14:17:00 +0500 Subject: [PATCH] CMake: Attempt to fix compilation error on Windows after recent changes --- CMakeLists.txt | 4 ++++ extern/libopenjpeg/CMakeLists.txt | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01116eec429..deafa90dbb5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2325,6 +2325,10 @@ if(WITH_IMAGE_OPENJPEG) set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg") set(OPENJPEG_DEFINES "-DOPJ_STATIC") endif() + # Special handling of Windows platform where openjpeg is always static. + if(WIN32) + set(OPENJPEG_DEFINES "-DOPJ_STATIC") + endif() endif() if(WITH_IMAGE_REDCODE) diff --git a/extern/libopenjpeg/CMakeLists.txt b/extern/libopenjpeg/CMakeLists.txt index 82eeb01b4d4..ad49eee25b6 100644 --- a/extern/libopenjpeg/CMakeLists.txt +++ b/extern/libopenjpeg/CMakeLists.txt @@ -31,11 +31,6 @@ set(INC_SYS ) -# TODO(sergey): Handle this via OPENJPEG_DEFINES -if(WIN32) - add_definitions(-DOPJ_STATIC) -endif() - add_definitions(${OPENJPEG_DEFINES}) set(SRC