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
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-16 07:11:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-16 07:15:18 +0300
commit813e470eac309a78d1f8cdc4a3abb0314b0ee5f3 (patch)
tree65bfb0ea60eb6f595b38fedcf33eb0a59f072cb0 /intern
parentbb6b7dd4adebcdacfeabdaf26daa5e0d49079f67 (diff)
CMake: cleanup, arg rename, add definitions last
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/bvh/CMakeLists.txt6
-rw-r--r--intern/cycles/cmake/macros.cmake7
-rw-r--r--intern/cycles/device/CMakeLists.txt6
-rw-r--r--intern/cycles/graph/CMakeLists.txt6
-rw-r--r--intern/cycles/kernel/CMakeLists.txt6
-rw-r--r--intern/cycles/kernel/osl/CMakeLists.txt6
-rw-r--r--intern/cycles/render/CMakeLists.txt5
-rw-r--r--intern/cycles/subd/CMakeLists.txt6
-rw-r--r--intern/cycles/util/CMakeLists.txt6
-rw-r--r--intern/libmv/CMakeLists.txt6
-rwxr-xr-xintern/libmv/bundle.sh10
11 files changed, 55 insertions, 15 deletions
diff --git a/intern/cycles/bvh/CMakeLists.txt b/intern/cycles/bvh/CMakeLists.txt
index 6014624f395..52f4138432b 100644
--- a/intern/cycles/bvh/CMakeLists.txt
+++ b/intern/cycles/bvh/CMakeLists.txt
@@ -35,7 +35,11 @@ set(SRC_HEADERS
bvh_unaligned.h
)
+set(LIB
+
+)
+
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
-cycles_add_library(cycles_bvh ${SRC} ${SRC_HEADERS})
+cycles_add_library(cycles_bvh "${LIB}" ${SRC} ${SRC_HEADERS})
diff --git a/intern/cycles/cmake/macros.cmake b/intern/cycles/cmake/macros.cmake
index f3ca06ac6b8..ed4c0e48c03 100644
--- a/intern/cycles/cmake/macros.cmake
+++ b/intern/cycles/cmake/macros.cmake
@@ -6,7 +6,12 @@ function(cycles_set_solution_folder target)
endif()
endfunction()
-macro(cycles_add_library target)
+macro(cycles_add_library target library_deps)
add_library(${target} ${ARGN})
+ if(DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS)
+ if(NOT ("${library_deps}" STREQUAL ""))
+ target_link_libraries(${target} "${library_deps}")
+ endif()
+ endif()
cycles_set_solution_folder(${target})
endmacro()
diff --git a/intern/cycles/device/CMakeLists.txt b/intern/cycles/device/CMakeLists.txt
index d95cd02a85e..f0f0390c29b 100644
--- a/intern/cycles/device/CMakeLists.txt
+++ b/intern/cycles/device/CMakeLists.txt
@@ -58,6 +58,10 @@ set(SRC_HEADERS
device_task.h
)
+set(LIB
+
+)
+
add_definitions(${GL_DEFINITIONS})
if(WITH_CYCLES_NETWORK)
add_definitions(-DWITH_NETWORK)
@@ -75,4 +79,4 @@ endif()
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
-cycles_add_library(cycles_device ${SRC} ${SRC_OPENCL} ${SRC_HEADERS})
+cycles_add_library(cycles_device "${LIB}" ${SRC} ${SRC_OPENCL} ${SRC_HEADERS})
diff --git a/intern/cycles/graph/CMakeLists.txt b/intern/cycles/graph/CMakeLists.txt
index 0ce56c2b2e6..bd2b2728a29 100644
--- a/intern/cycles/graph/CMakeLists.txt
+++ b/intern/cycles/graph/CMakeLists.txt
@@ -16,7 +16,11 @@ set(SRC_HEADERS
node_xml.h
)
+set(LIB
+
+)
+
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
-cycles_add_library(cycles_graph ${SRC} ${SRC_HEADERS})
+cycles_add_library(cycles_graph "${LIB}" ${SRC} ${SRC_HEADERS})
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index 822ce68bdc8..cbb69962781 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -333,6 +333,10 @@ set(SRC_SPLIT_HEADERS
split/kernel_subsurface_scatter.h
)
+set(LIB
+
+)
+
# CUDA module
if(WITH_CYCLES_CUDA_BINARIES)
@@ -507,7 +511,7 @@ if(CXX_HAS_AVX2)
set_source_files_properties(kernels/cpu/filter_avx2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}")
endif()
-cycles_add_library(cycles_kernel
+cycles_add_library(cycles_kernel "${LIB}"
${SRC_CPU_KERNELS}
${SRC_CUDA_KERNELS}
${SRC_OPENCL_KERNELS}
diff --git a/intern/cycles/kernel/osl/CMakeLists.txt b/intern/cycles/kernel/osl/CMakeLists.txt
index adca45c5c76..804610bdc10 100644
--- a/intern/cycles/kernel/osl/CMakeLists.txt
+++ b/intern/cycles/kernel/osl/CMakeLists.txt
@@ -25,9 +25,13 @@ set(HEADER_SRC
osl_shader.h
)
+set(LIB
+
+)
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}")
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
-cycles_add_library(cycles_kernel_osl ${SRC} ${HEADER_SRC})
+cycles_add_library(cycles_kernel_osl "${LIB}" ${SRC} ${HEADER_SRC})
diff --git a/intern/cycles/render/CMakeLists.txt b/intern/cycles/render/CMakeLists.txt
index b7c53f17c3d..af0f8b806a8 100644
--- a/intern/cycles/render/CMakeLists.txt
+++ b/intern/cycles/render/CMakeLists.txt
@@ -73,6 +73,9 @@ set(SRC_HEADERS
tile.h
)
+set(LIB
+)
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}")
include_directories(${INC})
@@ -80,4 +83,4 @@ include_directories(SYSTEM ${INC_SYS})
add_definitions(${GL_DEFINITIONS})
-cycles_add_library(cycles_render ${SRC} ${SRC_HEADERS})
+cycles_add_library(cycles_render "${LIB}" ${SRC} ${SRC_HEADERS})
diff --git a/intern/cycles/subd/CMakeLists.txt b/intern/cycles/subd/CMakeLists.txt
index 7f952dd43ce..9669bdede7e 100644
--- a/intern/cycles/subd/CMakeLists.txt
+++ b/intern/cycles/subd/CMakeLists.txt
@@ -21,7 +21,11 @@ set(SRC_HEADERS
subd_split.h
)
+set(LIB
+
+)
+
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
-cycles_add_library(cycles_subd ${SRC} ${SRC_HEADERS})
+cycles_add_library(cycles_subd "${LIB}" ${SRC} ${SRC_HEADERS})
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
index 16abed142b2..b8b38a531ea 100644
--- a/intern/cycles/util/CMakeLists.txt
+++ b/intern/cycles/util/CMakeLists.txt
@@ -27,6 +27,10 @@ set(SRC
util_transform.cpp
)
+set(LIB
+
+)
+
if(WITH_CYCLES_STANDALONE)
if (WITH_CYCLES_STANDALONE_GUI)
list(APPEND SRC
@@ -146,4 +150,4 @@ include_directories(SYSTEM ${INC_SYS})
add_definitions(${GL_DEFINITIONS})
-cycles_add_library(cycles_util ${SRC} ${SRC_HEADERS})
+cycles_add_library(cycles_util "${LIB}" ${SRC} ${SRC_HEADERS})
diff --git a/intern/libmv/CMakeLists.txt b/intern/libmv/CMakeLists.txt
index 5adfdbea1af..91e638c9c45 100644
--- a/intern/libmv/CMakeLists.txt
+++ b/intern/libmv/CMakeLists.txt
@@ -33,6 +33,10 @@ set(SRC
libmv-capi.h
)
+set(LIB
+
+)
+
if(WITH_LIBMV)
add_definitions(${GFLAGS_DEFINES})
add_definitions(${GLOG_DEFINES})
@@ -232,4 +236,4 @@ else()
)
endif()
-blender_add_lib(bf_intern_libmv "${SRC}" "${INC}" "${INC_SYS}" "")
+blender_add_lib(bf_intern_libmv "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/libmv/bundle.sh b/intern/libmv/bundle.sh
index 98a1e364634..27fc0e886a1 100755
--- a/intern/libmv/bundle.sh
+++ b/intern/libmv/bundle.sh
@@ -95,10 +95,6 @@ cat > CMakeLists.txt << EOF
#
# The Original Code is Copyright (C) 2011, Blender Foundation
# All rights reserved.
-#
-# Contributor(s): Blender Foundation,
-# Sergey Sharybin
-#
# ***** END GPL LICENSE BLOCK *****
# NOTE: This file is automatically generated by bundle.sh script
@@ -116,6 +112,10 @@ set(SRC
libmv-capi.h
)
+set(LIB
+
+)
+
if(WITH_LIBMV)
add_definitions(\${GFLAGS_DEFINES})
add_definitions(\${GLOG_DEFINES})
@@ -184,5 +184,5 @@ else()
)
endif()
-blender_add_lib(bf_intern_libmv "\${SRC}" "\${INC}" "\${INC_SYS}" "")
+blender_add_lib(bf_intern_libmv "\${SRC}" "\${INC}" "\${INC_SYS}" "\${LIB}")
EOF