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:
authorPeter Kim <pk15950@gmail.com>2022-09-08 07:00:12 +0300
committerPeter Kim <pk15950@gmail.com>2022-09-08 07:00:12 +0300
commit00dcfdf916c69672210b006e62d966f1bc2fbeb7 (patch)
tree0cbb1b91fe26c750197126085b74224a795a103c /intern/mikktspace/CMakeLists.txt
parenta39532670f6b668da7be5810fb1f844b82feeba3 (diff)
parentd5934974219135102f364f57c45a8b1465e2b8d9 (diff)
Merge branch 'master' into xr-devxr-dev
Diffstat (limited to 'intern/mikktspace/CMakeLists.txt')
-rw-r--r--intern/mikktspace/CMakeLists.txt42
1 files changed, 19 insertions, 23 deletions
diff --git a/intern/mikktspace/CMakeLists.txt b/intern/mikktspace/CMakeLists.txt
index f968e0b2de4..4ad1bea9c8a 100644
--- a/intern/mikktspace/CMakeLists.txt
+++ b/intern/mikktspace/CMakeLists.txt
@@ -1,28 +1,24 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright 2006 Blender Foundation. All rights reserved.
-if(CMAKE_COMPILER_IS_GNUCC)
- remove_cc_flag(
- "-Wshadow"
- "-Werror=shadow"
- )
-endif()
-
-set(INC
- .
-)
-
-set(INC_SYS
-
-)
+add_library(bf_intern_mikktspace INTERFACE)
+target_include_directories(bf_intern_mikktspace INTERFACE .)
-set(SRC
- mikktspace.c
-
- mikktspace.h
-)
-
-set(LIB
-)
+if(WITH_TBB)
+ target_compile_definitions(bf_intern_mikktspace INTERFACE -DWITH_TBB)
+ target_include_directories(bf_intern_mikktspace INTERFACE ${TBB_INCLUDE_DIRS})
+ target_link_libraries(bf_intern_mikktspace INTERFACE ${TBB_LIBRARIES})
+endif()
-blender_add_lib(bf_intern_mikktspace "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
+# CMake 3.19+ allows one to populate the interface library with
+# source files to show in the IDE.
+if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.19")
+ set(SRC
+ mikk_atomic_hash_set.hh
+ mikk_float3.hh
+ mikk_util.hh
+ mikktspace.hh
+ )
+ target_sources(bf_intern_mikktspace PRIVATE ${SRC})
+ blender_source_group(bf_intern_mikktspace ${SRC})
+endif()