mirror of https://github.com/wb2osz/direwolf.git
Fix cmake error on external misc library
For Linux builds, if strlcpt and strlcat are already provided, cmake is given an empty list of sources to build for the "misc" library. Newer versions of cmake throw an error for this. In this case, we should just avoid building the library. Failure pattern: CMake Error at external/misc/CMakeLists.txt:35 (add_library): No SOURCES given to target: misc CMake Generate step failed. Build files cannot be regenerated correctly. Fixes #319
This commit is contained in:
parent
a87b72e040
commit
760447b6e2
|
@ -32,9 +32,14 @@ if(LINUX)
|
|||
)
|
||||
endif()
|
||||
|
||||
if ( "${misc_SOURCES}" )
|
||||
add_library(misc STATIC
|
||||
${misc_SOURCES}
|
||||
)
|
||||
else()
|
||||
# Nothing to build
|
||||
set(MISC_LIBRARIES "" CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
elseif(WIN32 OR CYGWIN) # windows
|
||||
|
||||
|
|
Loading…
Reference in New Issue