diff options
Diffstat (limited to 'dep')
| -rw-r--r-- | dep/CascLib/CMakeLists.txt | 60 | ||||
| -rw-r--r-- | dep/SFMT/CMakeLists.txt | 52 | ||||
| -rw-r--r-- | dep/argon2/CMakeLists.txt | 36 | ||||
| -rw-r--r-- | dep/efsw/CMakeLists.txt | 211 | ||||
| -rw-r--r-- | dep/fmt/CMakeLists.txt | 47 | ||||
| -rw-r--r-- | dep/g3dlite/CMakeLists.txt | 110 | ||||
| -rw-r--r-- | dep/gsoap/CMakeLists.txt | 20 | ||||
| -rw-r--r-- | dep/openssl_ed25519/CMakeLists.txt | 30 | ||||
| -rw-r--r-- | dep/protobuf/CMakeLists.txt | 137 | ||||
| -rw-r--r-- | dep/recastnavigation/Detour/CMakeLists.txt | 29 | ||||
| -rw-r--r-- | dep/recastnavigation/Recast/CMakeLists.txt | 25 | ||||
| -rw-r--r-- | dep/zlib/CMakeLists.txt | 64 |
12 files changed, 478 insertions, 343 deletions
diff --git a/dep/CascLib/CMakeLists.txt b/dep/CascLib/CMakeLists.txt index b1a1e90b5e6..76910f3563c 100644 --- a/dep/CascLib/CMakeLists.txt +++ b/dep/CascLib/CMakeLists.txt @@ -1,23 +1,7 @@ -set(HEADER_FILES - src/CascCommon.h - src/CascLib.h - src/CascPort.h - src/common/Array.h - src/common/Common.h - src/common/Csv.h - src/common/Directory.h - src/common/FileStream.h - src/common/FileTree.h - src/common/ListFile.h - src/common/Map.h - src/common/Mime.h - src/common/Path.h - src/common/RootHandler.h - src/common/Sockets.h - src/jenkins/lookup.h -) +add_library(casc STATIC) -set(SRC_FILES +target_sources(casc + PRIVATE src/common/Common.cpp src/common/Directory.cpp src/common/Csv.cpp @@ -48,18 +32,36 @@ set(SRC_FILES src/CascRootFile_Text.cpp src/CascRootFile_TVFS.cpp src/CascRootFile_OW.cpp - src/CascRootFile_WoW.cpp -) - -add_library(casc STATIC ${SRC_FILES} ${HEADER_FILES}) + src/CascRootFile_WoW.cpp) -target_include_directories(casc - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/src - PRIVATE - ${CMAKE_SOURCE_DIR}/dep) +target_sources(casc + PUBLIC + FILE_SET HEADERS + BASE_DIRS src + FILES + src/CascLib.h + PRIVATE + FILE_SET casc_private_headers + TYPE HEADERS + BASE_DIRS src + FILES + src/CascCommon.h + src/CascPort.h + src/common/Array.h + src/common/Common.h + src/common/Csv.h + src/common/Directory.h + src/common/FileStream.h + src/common/FileTree.h + src/common/ListFile.h + src/common/Map.h + src/common/Mime.h + src/common/Path.h + src/common/RootHandler.h + src/common/Sockets.h + src/jenkins/lookup.h) -target_compile_definitions(casc PUBLIC __SYS_ZLIB CASCLIB_NO_AUTO_LINK_LIBRARY CASCLIB_NODEBUG) +target_compile_definitions(casc PUBLIC CASC_USE_SYSTEM_ZLIB CASCLIB_NO_AUTO_LINK_LIBRARY CASCLIB_NODEBUG) target_link_libraries(casc PRIVATE diff --git a/dep/SFMT/CMakeLists.txt b/dep/SFMT/CMakeLists.txt index 700118e9b5f..e68462ef830 100644 --- a/dep/SFMT/CMakeLists.txt +++ b/dep/SFMT/CMakeLists.txt @@ -9,31 +9,37 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -set(SFMT_SOURCES - SFMT.c - SFMT.h - SFMT-alti.h - SFMT-common.h - SFMT-neon.h - SFMT-params.h - SFMT-params607.h - SFMT-params1279.h - SFMT-params2281.h - SFMT-params4253.h - SFMT-params11213.h - SFMT-params19937.h - SFMT-params44497.h - SFMT-params86243.h - SFMT-params132049.h - SFMT-params216091.h - SFMT-sse2.h - SFMT-sse2-msc.h) +add_library(sfmt STATIC) -add_library(sfmt STATIC ${SFMT_SOURCES}) +target_sources(sfmt + PRIVATE + SFMT.c) -target_include_directories(sfmt - INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR}) +target_sources(sfmt + PUBLIC + FILE_SET HEADERS + FILES + SFMT.h + SFMT-params.h + SFMT-params607.h + SFMT-params1279.h + SFMT-params2281.h + SFMT-params4253.h + SFMT-params11213.h + SFMT-params19937.h + SFMT-params44497.h + SFMT-params86243.h + SFMT-params132049.h + SFMT-params216091.h + PRIVATE + FILE_SET sfmt_private_headers + TYPE HEADERS + FILES + SFMT-alti.h + SFMT-common.h + SFMT-neon.h + SFMT-sse2.h + SFMT-sse2-msc.h) # using the standard Mersenne exponent 19937 target_compile_definitions(sfmt PUBLIC SFMT_MEXP=19937) diff --git a/dep/argon2/CMakeLists.txt b/dep/argon2/CMakeLists.txt index 7b9a993e2a2..a3ee9f88fd1 100644 --- a/dep/argon2/CMakeLists.txt +++ b/dep/argon2/CMakeLists.txt @@ -8,18 +8,36 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -file(GLOB_RECURSE sources *.c) +add_library(argon2 STATIC) + +target_sources(argon2 + PRIVATE + argon2/argon2.c + argon2/core.c + argon2/encoding.c + argon2/thread.c + argon2/blake2/blake2b.c) if(TRINITY_SYSTEM_PROCESSOR MATCHES "x86|amd64") - list(REMOVE_ITEM sources - ${CMAKE_CURRENT_SOURCE_DIR}/argon2/ref.c) + target_sources(argon2 PRIVATE argon2/opt.c) else() - list(REMOVE_ITEM sources - ${CMAKE_CURRENT_SOURCE_DIR}/argon2/opt.c) + target_sources(argon2 PRIVATE argon2/ref.c) endif() -add_library(argon2 STATIC - ${sources}) +target_sources(argon2 + PUBLIC + FILE_SET HEADERS + FILES + argon2/argon2.h + PRIVATE + FILE_SET argon2_private_headers + TYPE HEADERS + FILES + argon2/core.h + argon2/encoding.h + argon2/thread.h + argon2/blake2/blake2.h + argon2/blake2/blake2-impl.h) target_compile_definitions(argon2 PRIVATE @@ -27,10 +45,6 @@ target_compile_definitions(argon2 set_target_properties(argon2 PROPERTIES LINKER_LANGUAGE CXX) -target_include_directories(argon2 - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}) - target_link_libraries(argon2 PRIVATE trinity-dependency-interface) diff --git a/dep/efsw/CMakeLists.txt b/dep/efsw/CMakeLists.txt index 555f1b303a0..aba29c55905 100644 --- a/dep/efsw/CMakeLists.txt +++ b/dep/efsw/CMakeLists.txt @@ -1,79 +1,116 @@ if (BUILD_SHARED_LIBS) - set(EFSW_CPP_SOURCE - src/efsw/Atomic.hpp - src/efsw/base.hpp - src/efsw/Debug.cpp - src/efsw/Debug.hpp - src/efsw/DirectorySnapshot.cpp - src/efsw/DirectorySnapshot.hpp - src/efsw/DirectorySnapshotDiff.cpp - src/efsw/DirectorySnapshotDiff.hpp - src/efsw/DirWatcherGeneric.cpp - src/efsw/DirWatcherGeneric.hpp - src/efsw/FileInfo.cpp - src/efsw/FileInfo.hpp - src/efsw/FileSystem.cpp - src/efsw/FileSystem.hpp - src/efsw/FileWatcher.cpp - src/efsw/FileWatcherCWrapper.cpp - src/efsw/FileWatcherGeneric.cpp - src/efsw/FileWatcherGeneric.hpp - src/efsw/FileWatcherImpl.cpp - src/efsw/FileWatcherImpl.hpp - src/efsw/Lock.hpp - src/efsw/Log.cpp - src/efsw/Mutex.hpp - src/efsw/sophist.h - src/efsw/String.cpp - src/efsw/String.hpp - src/efsw/System.cpp - src/efsw/System.hpp - src/efsw/Thread.hpp - src/efsw/Utf.hpp - src/efsw/Watcher.cpp - src/efsw/Watcher.hpp - src/efsw/WatcherGeneric.cpp - src/efsw/WatcherGeneric.hpp - src/efsw/platform/platformimpl.hpp - ) + add_library(efsw STATIC) - if (WIN32) - list (APPEND EFSW_CPP_SOURCE - src/efsw/platform/win/FileSystemImpl.cpp - src/efsw/platform/win/FileSystemImpl.hpp - src/efsw/platform/win/SystemImpl.cpp - src/efsw/platform/win/SystemImpl.hpp) - else () - list (APPEND EFSW_CPP_SOURCE - src/efsw/platform/posix/FileSystemImpl.cpp - src/efsw/platform/posix/FileSystemImpl.hpp - src/efsw/platform/posix/SystemImpl.cpp - src/efsw/platform/posix/SystemImpl.hpp) + if(WIN32) + set(efsw_platform_dir "win") + else() + set(efsw_platform_dir "posix") endif() + target_sources(efsw + PRIVATE + src/efsw/Debug.cpp + src/efsw/DirectorySnapshot.cpp + src/efsw/DirectorySnapshotDiff.cpp + src/efsw/DirWatcherGeneric.cpp + src/efsw/FileInfo.cpp + src/efsw/FileSystem.cpp + src/efsw/FileWatcher.cpp + src/efsw/FileWatcherCWrapper.cpp + src/efsw/FileWatcherGeneric.cpp + src/efsw/FileWatcherImpl.cpp + src/efsw/Log.cpp + src/efsw/String.cpp + src/efsw/System.cpp + src/efsw/Watcher.cpp + src/efsw/WatcherGeneric.cpp + src/efsw/platform/${efsw_platform_dir}/FileSystemImpl.cpp + src/efsw/platform/${efsw_platform_dir}/SystemImpl.cpp) + + target_sources(efsw + PUBLIC + FILE_SET HEADERS + BASE_DIRS include + FILES + include/efsw/efsw.h + include/efsw/efsw.hpp) + + target_sources(efsw + PRIVATE + FILE_SET efsw_private_headers + TYPE HEADERS + BASE_DIRS src + FILES + src/efsw/Atomic.hpp + src/efsw/base.hpp + src/efsw/Debug.hpp + src/efsw/DirectorySnapshot.hpp + src/efsw/DirectorySnapshotDiff.hpp + src/efsw/DirWatcherGeneric.hpp + src/efsw/FileInfo.hpp + src/efsw/FileSystem.hpp + src/efsw/FileWatcherGeneric.hpp + src/efsw/FileWatcherImpl.hpp + src/efsw/Lock.hpp + src/efsw/Mutex.hpp + src/efsw/sophist.h + src/efsw/String.hpp + src/efsw/System.hpp + src/efsw/Thread.hpp + src/efsw/Utf.hpp + src/efsw/Watcher.hpp + src/efsw/WatcherGeneric.hpp + src/efsw/platform/platformimpl.hpp + src/efsw/platform/${efsw_platform_dir}/FileSystemImpl.hpp + src/efsw/platform/${efsw_platform_dir}/SystemImpl.hpp) + if (APPLE) - list (APPEND EFSW_CPP_SOURCE - src/efsw/FileWatcherFSEvents.cpp - src/efsw/FileWatcherFSEvents.hpp - src/efsw/FileWatcherKqueue.cpp - src/efsw/FileWatcherKqueue.hpp - src/efsw/WatcherFSEvents.cpp - src/efsw/WatcherFSEvents.hpp - src/efsw/WatcherKqueue.cpp - src/efsw/WatcherKqueue.hpp) - set(OPTIONAL_LINK_LIBRARIES "-framework CoreFoundation" "-framework CoreServices") + target_sources(efsw + PRIVATE + src/efsw/FileWatcherFSEvents.cpp + src/efsw/FileWatcherKqueue.cpp + src/efsw/WatcherFSEvents.cpp + src/efsw/WatcherKqueue.cpp) + target_sources(efsw + PRIVATE + FILE_SET efsw_private_headers + TYPE HEADERS + BASE_DIRS src + FILES + src/efsw/FileWatcherFSEvents.hpp + src/efsw/FileWatcherKqueue.hpp + src/efsw/WatcherFSEvents.hpp + src/efsw/WatcherKqueue.hpp) + target_link_libraries(efsw + PRIVATE + $<LINK_LIBRARY:FRAMEWORK,CoreFoundation> + $<LINK_LIBRARY:FRAMEWORK,CoreServices>) elseif (WIN32) - list (APPEND EFSW_CPP_SOURCE - src/efsw/FileWatcherWin32.cpp - src/efsw/FileWatcherWin32.hpp - src/efsw/WatcherWin32.cpp - src/efsw/WatcherWin32.hpp) + target_sources(efsw + PRIVATE + src/efsw/FileWatcherWin32.cpp + src/efsw/WatcherWin32.cpp) + target_sources(efsw + PRIVATE + FILE_SET efsw_private_headers + TYPE HEADERS + BASE_DIRS src + FILES + src/efsw/FileWatcherWin32.hpp + src/efsw/WatcherWin32.hpp) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - list (APPEND EFSW_CPP_SOURCE - src/efsw/FileWatcherInotify.cpp - src/efsw/FileWatcherInotify.hpp - src/efsw/WatcherInotify.cpp - src/efsw/WatcherInotify.hpp) + target_sources(efsw + PRIVATE + src/efsw/FileWatcherInotify.cpp + src/efsw/WatcherInotify.cpp) + target_sources(efsw + PRIVATE + FILE_SET efsw_private_headers + TYPE HEADERS + BASE_DIRS src + FILES + src/efsw/FileWatcherInotify.hpp + src/efsw/WatcherInotify.hpp) find_path(EFSW_INOTIFY_H NAMES sys/inotify.h @@ -83,34 +120,30 @@ if (BUILD_SHARED_LIBS) list (APPEND EFSW_CPP_SOURCE src/efsw/inotify-nosys.h ) - set(OPTIONAL_COMPILE_DEFINITIONS "-DEFSW_INOTIFY_NOSYS") + target_compile_definitions(efsw + PRIVATE + EFSW_INOTIFY_NOSYS) endif() elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") - list (APPEND EFSW_CPP_SOURCE - src/efsw/FileWatcherKqueue.cpp - src/efsw/FileWatcherKqueue.hpp - src/efsw/WatcherKqueue.cpp - src/efsw/WatcherKqueue.hpp) + target_sources(efsw + PRIVATE + src/efsw/FileWatcherKqueue.cpp + src/efsw/WatcherKqueue.cpp) + target_sources(efsw + PRIVATE + FILE_SET efsw_private_headers + TYPE HEADERS + BASE_DIRS src + FILES + src/efsw/FileWatcherKqueue.hpp + src/efsw/WatcherKqueue.hpp) endif() - add_library(efsw STATIC ${EFSW_CPP_SOURCE}) - - target_include_directories(efsw - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/src) - - target_compile_definitions(efsw - PRIVATE - ${OPTIONAL_COMPILE_DEFINITIONS}) - target_link_libraries(efsw PRIVATE trinity-dependency-interface PUBLIC - threads - ${OPTIONAL_LINK_LIBRARIES}) + threads) set_target_properties(efsw PROPERTIES diff --git a/dep/fmt/CMakeLists.txt b/dep/fmt/CMakeLists.txt index edd263c2331..2568d7fefc7 100644 --- a/dep/fmt/CMakeLists.txt +++ b/dep/fmt/CMakeLists.txt @@ -8,31 +8,32 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -set(FMT_HEADERS - include/fmt/args.h - include/fmt/base.h - include/fmt/chrono.h - include/fmt/color.h - include/fmt/compile.h - include/fmt/core.h - include/fmt/format.h - include/fmt/format-inl.h - include/fmt/os.h - include/fmt/ostream.h - include/fmt/printf.h - include/fmt/ranges.h - include/fmt/std.h - include/fmt/xchar.h) +add_library(fmt STATIC) -set(FMT_SOURCES - src/format.cc - src/os.cc) - -add_library(fmt STATIC ${FMT_SOURCES} ${FMT_HEADERS}) - -target_include_directories(fmt +target_sources(fmt PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include) + FILE_SET HEADERS + BASE_DIRS include + FILES + include/fmt/args.h + include/fmt/base.h + include/fmt/chrono.h + include/fmt/color.h + include/fmt/compile.h + include/fmt/core.h + include/fmt/format.h + include/fmt/format-inl.h + include/fmt/os.h + include/fmt/ostream.h + include/fmt/printf.h + include/fmt/ranges.h + include/fmt/std.h + include/fmt/xchar.h) + +target_sources(fmt + PRIVATE + src/format.cc + src/os.cc) target_link_libraries(fmt PRIVATE diff --git a/dep/g3dlite/CMakeLists.txt b/dep/g3dlite/CMakeLists.txt index 2397bd8d05b..7116b512f39 100644 --- a/dep/g3dlite/CMakeLists.txt +++ b/dep/g3dlite/CMakeLists.txt @@ -8,57 +8,71 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -set(g3dlib_STAT_SRCS - source/AABox.cpp - source/Any.cpp - source/AnyTableReader.cpp - source/BinaryFormat.cpp - source/BinaryInput.cpp - source/BinaryOutput.cpp - source/Box.cpp - source/Capsule.cpp - source/CollisionDetection.cpp - source/CoordinateFrame.cpp - source/Crypto.cpp - source/Cylinder.cpp - source/debugAssert.cpp - source/FileSystem.cpp - source/fileutils.cpp - source/format.cpp - source/g3dfnmatch.cpp - source/g3dmath.cpp - source/GThread.cpp - source/Line.cpp - source/LineSegment.cpp - source/Log.cpp - source/Matrix3.cpp - source/Matrix4.cpp - source/MemoryManager.cpp - source/PhysicsFrame.cpp - source/Plane.cpp - source/prompt.cpp - source/Quat.cpp - source/Random.cpp - source/Ray.cpp - source/RegistryUtil.cpp - source/Sphere.cpp - source/stringutils.cpp - source/System.cpp - source/TextInput.cpp - source/TextOutput.cpp - source/Triangle.cpp - source/uint128.cpp - source/UprightFrame.cpp - source/Vector2.cpp - source/Vector3.cpp - source/Vector4.cpp -) +add_library(g3dlib STATIC) -add_library(g3dlib STATIC ${g3dlib_STAT_SRCS}) +target_sources(g3dlib + PRIVATE + source/AABox.cpp + source/Any.cpp + source/AnyTableReader.cpp + source/BinaryFormat.cpp + source/BinaryInput.cpp + source/BinaryOutput.cpp + source/Box.cpp + source/Capsule.cpp + source/CollisionDetection.cpp + source/CoordinateFrame.cpp + source/Crypto.cpp + source/Cylinder.cpp + source/debugAssert.cpp + source/FileSystem.cpp + source/fileutils.cpp + source/format.cpp + source/g3dfnmatch.cpp + source/g3dmath.cpp + source/GThread.cpp + source/Line.cpp + source/LineSegment.cpp + source/Log.cpp + source/Matrix3.cpp + source/Matrix4.cpp + source/MemoryManager.cpp + source/PhysicsFrame.cpp + source/Plane.cpp + source/prompt.cpp + source/Quat.cpp + source/Random.cpp + source/Ray.cpp + source/RegistryUtil.cpp + source/Sphere.cpp + source/stringutils.cpp + source/System.cpp + source/TextInput.cpp + source/TextOutput.cpp + source/Triangle.cpp + source/uint128.cpp + source/UprightFrame.cpp + source/Vector2.cpp + source/Vector3.cpp + source/Vector4.cpp) -target_include_directories(g3dlib +target_sources(g3dlib PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include) + FILE_SET HEADERS + BASE_DIRS include + FILES + include/G3D/AABox.h + include/G3D/BoundsTrait.h + include/G3D/Box.h + include/G3D/CoordinateFrame.h + include/G3D/g3dmath.h + include/G3D/Matrix3.h + include/G3D/Matrix4.h + include/G3D/Plane.h + include/G3D/Quat.h + include/G3D/Ray.h + include/G3D/Vector3.h + include/G3D/Vector4.h) if((CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT NOJEM) OR TSAN) target_compile_definitions(g3dlib diff --git a/dep/gsoap/CMakeLists.txt b/dep/gsoap/CMakeLists.txt index 77fb50d1e87..6a50b6b68c4 100644 --- a/dep/gsoap/CMakeLists.txt +++ b/dep/gsoap/CMakeLists.txt @@ -8,15 +8,23 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -file(GLOB sources *.cpp *.c *.h) +add_library(gsoap STATIC) -add_library(gsoap STATIC ${sources}) - -set_target_properties(gsoap PROPERTIES LINKER_LANGUAGE CXX) +target_sources(gsoap + PRIVATE + soapC.cpp + soapServer.cpp + stdsoap2.cpp) -target_include_directories(gsoap +target_sources(gsoap PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}) + FILE_SET HEADERS + FILES + soapH.h + soapStub.h + stdsoap2.h) + +set_target_properties(gsoap PROPERTIES LINKER_LANGUAGE CXX) target_compile_definitions(gsoap PUBLIC diff --git a/dep/openssl_ed25519/CMakeLists.txt b/dep/openssl_ed25519/CMakeLists.txt index 946aaaf7f3b..3e1be229b70 100644 --- a/dep/openssl_ed25519/CMakeLists.txt +++ b/dep/openssl_ed25519/CMakeLists.txt @@ -8,25 +8,29 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -file(GLOB RECURSE sources *.cpp *.c *.h) +add_library(openssl_ed25519 SHARED) -add_library(openssl_ed25519 - SHARED - curve25519.c - ed25519/ed25519.h - ec_lcl.h - internal/refcount.h) - -set_target_properties(openssl_ed25519 PROPERTIES LINKER_LANGUAGE CXX) +target_sources(openssl_ed25519 + PRIVATE + curve25519.c) -target_include_directories(openssl_ed25519 +target_sources(openssl_ed25519 PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}) + FILE_SET HEADERS + FILES + ed25519/ed25519.h + PRIVATE + FILE_SET openssl_ed25519_private_headers + TYPE HEADERS + FILES + ec_lcl.h + internal/refcount.h) + +set_target_properties(openssl_ed25519 PROPERTIES LINKER_LANGUAGE CXX) target_compile_definitions(openssl_ed25519 PRIVATE - OPENSSL_ED25519_EXPORT -) + OPENSSL_ED25519_EXPORT) target_link_libraries(openssl_ed25519 PRIVATE diff --git a/dep/protobuf/CMakeLists.txt b/dep/protobuf/CMakeLists.txt index cce1181568a..2bd3a01f1f0 100644 --- a/dep/protobuf/CMakeLists.txt +++ b/dep/protobuf/CMakeLists.txt @@ -8,61 +8,98 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -set(protobuf_STAT_SRCS - src/google/protobuf/compiler/importer.cc - src/google/protobuf/compiler/parser.cc - src/google/protobuf/descriptor.cc - src/google/protobuf/descriptor.pb.cc - src/google/protobuf/descriptor_database.cc - src/google/protobuf/dynamic_message.cc - src/google/protobuf/extension_set.cc - src/google/protobuf/extension_set_heavy.cc - src/google/protobuf/generated_message_reflection.cc - src/google/protobuf/generated_message_util.cc - src/google/protobuf/io/coded_stream.cc - src/google/protobuf/io/gzip_stream.cc - src/google/protobuf/io/printer.cc - src/google/protobuf/io/strtod.cc - src/google/protobuf/io/tokenizer.cc - src/google/protobuf/io/zero_copy_stream.cc - src/google/protobuf/io/zero_copy_stream_impl.cc - src/google/protobuf/io/zero_copy_stream_impl_lite.cc - src/google/protobuf/message.cc - src/google/protobuf/message_lite.cc - src/google/protobuf/reflection_ops.cc - src/google/protobuf/repeated_field.cc - src/google/protobuf/service.cc - src/google/protobuf/stubs/common.cc - src/google/protobuf/stubs/once.cc - src/google/protobuf/stubs/stringprintf.cc - src/google/protobuf/stubs/structurally_valid.cc - src/google/protobuf/stubs/strutil.cc - src/google/protobuf/stubs/substitute.cc - src/google/protobuf/text_format.cc - src/google/protobuf/unknown_field_set.cc - src/google/protobuf/wire_format.cc - src/google/protobuf/wire_format_lite.cc -) +add_library(protobuf) -if (MSVC) - set(protobuf_STAT_SRCS - ${protobuf_STAT_SRCS} - src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc - ) -else() - set(protobuf_STAT_SRCS - ${protobuf_STAT_SRCS} +target_sources(protobuf + PRIVATE + src/google/protobuf/compiler/importer.cc + src/google/protobuf/compiler/parser.cc + src/google/protobuf/descriptor.cc + src/google/protobuf/descriptor.pb.cc + src/google/protobuf/descriptor_database.cc + src/google/protobuf/dynamic_message.cc + src/google/protobuf/extension_set.cc + src/google/protobuf/extension_set_heavy.cc + src/google/protobuf/generated_message_reflection.cc + src/google/protobuf/generated_message_util.cc + src/google/protobuf/io/coded_stream.cc + src/google/protobuf/io/gzip_stream.cc + src/google/protobuf/io/printer.cc + src/google/protobuf/io/strtod.cc + src/google/protobuf/io/tokenizer.cc + src/google/protobuf/io/zero_copy_stream.cc + src/google/protobuf/io/zero_copy_stream_impl.cc + src/google/protobuf/io/zero_copy_stream_impl_lite.cc + src/google/protobuf/message.cc + src/google/protobuf/message_lite.cc + src/google/protobuf/reflection_ops.cc + src/google/protobuf/repeated_field.cc + src/google/protobuf/service.cc src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc - ) -endif() - -add_library(protobuf ${protobuf_STAT_SRCS}) + src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc + src/google/protobuf/stubs/common.cc + src/google/protobuf/stubs/once.cc + src/google/protobuf/stubs/stringprintf.cc + src/google/protobuf/stubs/structurally_valid.cc + src/google/protobuf/stubs/strutil.cc + src/google/protobuf/stubs/substitute.cc + src/google/protobuf/text_format.cc + src/google/protobuf/unknown_field_set.cc + src/google/protobuf/wire_format.cc + src/google/protobuf/wire_format_lite.cc) -target_include_directories(protobuf +target_sources(protobuf PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/src + FILE_SET HEADERS + BASE_DIRS src + FILES + src/google/protobuf/compiler/importer.h + src/google/protobuf/compiler/parser.h + src/google/protobuf/descriptor_database.h + src/google/protobuf/descriptor.h + src/google/protobuf/descriptor.pb.h + src/google/protobuf/dynamic_message.h + src/google/protobuf/extension_set.h + src/google/protobuf/generated_enum_reflection.h + src/google/protobuf/generated_message_reflection.h + src/google/protobuf/generated_message_util.h + src/google/protobuf/io/coded_stream.h + src/google/protobuf/io/coded_stream_inl.h + src/google/protobuf/io/gzip_stream.h + src/google/protobuf/io/printer.h + src/google/protobuf/io/strtod.h + src/google/protobuf/io/tokenizer.h + src/google/protobuf/io/zero_copy_stream.h + src/google/protobuf/io/zero_copy_stream_impl.h + src/google/protobuf/io/zero_copy_stream_impl_lite.h + src/google/protobuf/message.h + src/google/protobuf/message_lite.h + src/google/protobuf/reflection_ops.h + src/google/protobuf/repeated_field.h + src/google/protobuf/service.h + src/google/protobuf/stubs/atomicops.h + src/google/protobuf/stubs/common.h + src/google/protobuf/stubs/hash.h + src/google/protobuf/stubs/map_util.h + src/google/protobuf/stubs/once.h + src/google/protobuf/stubs/platform_macros.h + src/google/protobuf/stubs/stl_util.h + src/google/protobuf/stubs/stringprintf.h + src/google/protobuf/stubs/strutil.h + src/google/protobuf/stubs/substitute.h + src/google/protobuf/stubs/template_util.h + src/google/protobuf/stubs/type_traits.h + src/google/protobuf/text_format.h + src/google/protobuf/unknown_field_set.h + src/google/protobuf/wire_format.h + src/google/protobuf/wire_format_lite.h + src/google/protobuf/wire_format_lite_inl.h PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/tc_custom) + FILE_SET protobuf_private_headers + TYPE HEADERS + BASE_DIRS tc_custom + FILES + tc_custom/config.h) target_link_libraries(protobuf PRIVATE diff --git a/dep/recastnavigation/Detour/CMakeLists.txt b/dep/recastnavigation/Detour/CMakeLists.txt index 4ea573681f7..7e0fabb41af 100644 --- a/dep/recastnavigation/Detour/CMakeLists.txt +++ b/dep/recastnavigation/Detour/CMakeLists.txt @@ -8,27 +8,36 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -set(Detour_STAT_SRCS +add_library(Detour STATIC) + +target_sources(Detour + PRIVATE Source/DetourAlloc.cpp Source/DetourAssert.cpp Source/DetourCommon.cpp Source/DetourNavMesh.cpp Source/DetourNavMeshBuilder.cpp Source/DetourNavMeshQuery.cpp - Source/DetourNode.cpp -) + Source/DetourNode.cpp) -add_library(Detour STATIC ${Detour_STAT_SRCS}) - -target_include_directories(Detour +target_sources(Detour PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/Include) + FILE_SET HEADERS + BASE_DIRS Include + FILES + Include/DetourAlloc.h + Include/DetourAssert.h + Include/DetourCommon.h + Include/DetourMath.h + Include/DetourNavMeshBuilder.h + Include/DetourNavMesh.h + Include/DetourNavMeshQuery.h + Include/DetourNode.h + Include/DetourStatus.h) target_link_libraries(Detour PRIVATE - trinity-dependency-interface - PUBLIC - zlib) + trinity-dependency-interface) set_target_properties(Detour PROPERTIES diff --git a/dep/recastnavigation/Recast/CMakeLists.txt b/dep/recastnavigation/Recast/CMakeLists.txt index 0346d74001e..fec6666c5dc 100644 --- a/dep/recastnavigation/Recast/CMakeLists.txt +++ b/dep/recastnavigation/Recast/CMakeLists.txt @@ -8,10 +8,13 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -set(Recast_STAT_SRCS +add_library(Recast STATIC) + +target_sources(Recast + PRIVATE Source/Recast.cpp Source/RecastAlloc.cpp - Source/RecastAssert.cpp + Source/RecastAssert.cpp Source/RecastArea.cpp Source/RecastContour.cpp Source/RecastFilter.cpp @@ -19,20 +22,20 @@ set(Recast_STAT_SRCS Source/RecastMesh.cpp Source/RecastMeshDetail.cpp Source/RecastRasterization.cpp - Source/RecastRegion.cpp -) + Source/RecastRegion.cpp) -add_library(Recast STATIC ${Recast_STAT_SRCS}) - -target_include_directories(Recast +target_sources(Recast PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/Include) + FILE_SET HEADERS + BASE_DIRS Include + FILES + Include/RecastAlloc.h + Include/RecastAssert.h + Include/Recast.h) target_link_libraries(Recast PRIVATE - trinity-dependency-interface - PUBLIC - zlib) + trinity-dependency-interface) set_target_properties(Recast PROPERTIES diff --git a/dep/zlib/CMakeLists.txt b/dep/zlib/CMakeLists.txt index 6b2af4c987a..93d569e1a09 100644 --- a/dep/zlib/CMakeLists.txt +++ b/dep/zlib/CMakeLists.txt @@ -22,39 +22,43 @@ if(UNIX) "${ZLIB_INCLUDE_DIRS}") else() # Use the bundled source on windows - SET(zlib_STAT_SRCS - adler32.c - compress.c - crc32.c - crc32.h - deflate.c - deflate.h - gzguts.h - infback.c - inffast.c - inffast.h - inffixed.h - inflate.c - inflate.h - inftrees.c - inftrees.h - trees.c - trees.h - uncompr.c - zconf.h - zlib.h - zutil.c - zutil.h - ) + add_library(zlib STATIC) - add_library(zlib STATIC - ${zlib_STAT_SRCS}) - - set_target_properties(zlib PROPERTIES LINKER_LANGUAGE CXX) + target_sources(zlib + PRIVATE + adler32.c + compress.c + crc32.c + deflate.c + infback.c + inffast.c + inflate.c + inftrees.c + trees.c + uncompr.c + zutil.c) - target_include_directories(zlib + target_sources(zlib PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}) + FILE_SET HEADERS + FILES + zlib.h + PRIVATE + FILE_SET zlib_private_headers + TYPE HEADERS + FILES + crc32.h + deflate.h + gzguts.h + inffast.h + inffixed.h + inflate.h + inftrees.h + trees.h + zconf.h + zutil.h) + + set_target_properties(zlib PROPERTIES LINKER_LANGUAGE CXX) target_link_libraries(zlib PRIVATE |
