Cleanup: CMake: Modernize bf_intern_utfconv dependencies
- Remove any bf_intern_utfconv paths from INC - Add a dependency though LIB when missing - an empty target is created for non windows builds, so we don't have to if(WIN32) this all over the place context: https://devtalk.blender.org/t/cmake-cleanup/30260 Pull Request: https://projects.blender.org/blender/blender/pulls/115373
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(INC
|
||||
.
|
||||
PUBLIC .
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
@@ -19,14 +19,16 @@ set(SRC
|
||||
set(LIB
|
||||
)
|
||||
|
||||
# This is odd but leave it for now...
|
||||
# Why have win32 check here? - this is only used for windows.
|
||||
# ... because one day we might want to use it on other platforms.
|
||||
# This library is currently windows only, for the other platforms an empty target is created this
|
||||
# way we don't have to clutter if(WIN32) ... endif() all over the place to use this library.
|
||||
if(WIN32)
|
||||
list(APPEND SRC
|
||||
utf_winfunc.cc
|
||||
utf_winfunc.hh
|
||||
)
|
||||
blender_add_lib(bf_intern_utfconv "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
else()
|
||||
add_library(bf_intern_utfconv INTERFACE)
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_intern_utfconv "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
add_library(bf::intern::utfconv ALIAS bf_intern_utfconv)
|
||||
|
||||
Reference in New Issue
Block a user