obs-studio/deps/blake2/CMakeLists.txt
PatTheMav 9889fcdfcc cmake: Group blake2 targets under same directory for IDEs
The blake2_static target has no specific FOLDER property set and thus
would appear ungrouped in Visual Studio's Solution Explorer.

With this change both the default blake2 target as well as
blake2_static appear in their own "blake2" subdirectory.
2025-04-25 20:06:41 -04:00

23 lines
869 B
CMake

cmake_minimum_required(VERSION 3.28...3.30)
add_library(blake2 OBJECT)
add_library(OBS::blake2 ALIAS blake2)
target_sources(blake2 PRIVATE src/blake2-impl.h src/blake2b-ref.c PUBLIC src/blake2.h)
target_include_directories(blake2 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
set_target_properties(blake2 PROPERTIES FOLDER deps)
if(OS_WINDOWS)
add_library(blake2_static OBJECT)
add_library(OBS::blake2_static ALIAS blake2_static)
target_sources(blake2_static PRIVATE src/blake2-impl.h src/blake2b-ref.c PUBLIC src/blake2.h)
target_include_directories(blake2_static PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
set_target_properties(blake2_static PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_target_properties(blake2 PROPERTIES FOLDER deps/blake2)
set_target_properties(blake2_static PROPERTIES FOLDER deps/blake2)
endif()