add direct source dependency to each library

Fix library generation with some CMake generators by including a direct
source file dependency for each library.
This commit is contained in:
Brent Cook
2022-12-13 05:44:07 -06:00
parent 4f0f6ebd1a
commit 80eb145460
7 changed files with 9 additions and 3 deletions

View File

@@ -1009,7 +1009,7 @@ target_include_directories(crypto_obj
PUBLIC
../include)
add_library(crypto $<TARGET_OBJECTS:crypto_obj>)
add_library(crypto $<TARGET_OBJECTS:crypto_obj> empty.c)
export_symbol(crypto ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym)
target_link_libraries(crypto ${PLATFORM_LIBS})

View File

@@ -32,6 +32,7 @@ endif
EXTRA_DIST = VERSION
EXTRA_DIST += CMakeLists.txt
EXTRA_DIST += crypto.sym
EXTRA_DIST += empty.c
# needed for a CMake target
EXTRA_DIST += compat/strcasecmp.c