[Bf-blender-cvs] [a712459] master: CMake: Attempt to fix compilation error on Windows after recent changes

Sergey Sharybin noreply at git.blender.org
Thu Sep 17 11:17:29 CEST 2015


Commit: a712459603be05fd3c25c12f7153755160259f54
Author: Sergey Sharybin
Date:   Thu Sep 17 14:17:00 2015 +0500
Branches: master
https://developer.blender.org/rBa712459603be05fd3c25c12f7153755160259f54

CMake: Attempt to fix compilation error on Windows after recent changes

===================================================================

M	CMakeLists.txt
M	extern/libopenjpeg/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01116ee..deafa90 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 82eeb01..ad49eee 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




More information about the Bf-blender-cvs mailing list