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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-11-16 16:01:10 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-31 23:31:08 +0300
commit9b8942ac71cfe000b1402c5379342c2f1be2b288 (patch)
treeb1985adef97ce070d4ffad200b3287c8c4e98e4c /intern/cycles/cmake
parent9e2e408323f967a3f8b13e27e601ebfaa109ffcd (diff)
Cycles Standalone: Add initial support for compilation on Windows
This applies to an application comiling from the standalone Cycles repository only. There's still lack of proper install target, so currently pthreads library is to be copied next to cycles.exe manually.
Diffstat (limited to 'intern/cycles/cmake')
-rw-r--r--intern/cycles/cmake/external_libs.cmake27
1 files changed, 19 insertions, 8 deletions
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index 465f2d27cf9..00c9b5179d6 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -1,4 +1,13 @@
###########################################################################
+# Precompiled libraries tips and hints, for find_package().
+
+if(CYCLES_STANDALONE_REPOSITORY)
+ if(APPLE OR WIN32)
+ include(precompiled_libs)
+ endif()
+endif()
+
+###########################################################################
# GLUT
if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI)
@@ -42,13 +51,13 @@ endif()
# source code. but which we need to take care of when building Cycles from a
# standalone repository
if(CYCLES_STANDALONE_REPOSITORY)
- if(APPLE OR WIN32)
- include(precompiled_libs)
- endif()
-
# PThreads
- find_package(Threads REQUIRED)
- set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+ # TODO(sergey): Bloody exception, handled in precompiled_libs.cmake.
+ if(NOT WIN32)
+ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+ find_package(Threads REQUIRED)
+ set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+ endif()
####
# OpenGL
@@ -83,10 +92,12 @@ if(CYCLES_STANDALONE_REPOSITORY)
if(WITH_CYCLES_NETWORK)
list(APPEND __boost_packages serialization)
endif()
- if(WITH_CYCLES_OSL AND APPLE)
+ if(WITH_CYCLES_OSL)
# TODO(sergey): This is because of the way how our precompiled
# libraries works, could be different for someone's else libs..
- list(APPEND __boost_packages wave)
+ if(APPLE OR MSVC)
+ list(APPEND __boost_packages wave)
+ endif()
endif()
find_package(Boost 1.48 COMPONENTS ${__boost_packages} REQUIRED)
if(NOT Boost_FOUND)