Update mbgl.cmake
This commit is contained in:
committed by
Konstantin Käfer
parent
8ae5ea953e
commit
070f50d6b0
@@ -115,7 +115,7 @@ endfunction()
|
||||
|
||||
# Creates a library target for a vendored dependency
|
||||
function(add_vendor_target NAME TYPE)
|
||||
add_library(${NAME} ${TYPE} cmake/empty.cpp)
|
||||
add_library(${NAME} ${TYPE} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/empty.cpp")
|
||||
set(INCLUDE_TYPE "INTERFACE")
|
||||
set(SOURCE_TYPE "INTERFACE")
|
||||
if (TYPE STREQUAL "STATIC" OR TYPE STREQUAL "SHARED")
|
||||
@@ -124,11 +124,11 @@ function(add_vendor_target NAME TYPE)
|
||||
set_target_properties(${NAME} PROPERTIES SOURCES "")
|
||||
endif()
|
||||
set_target_properties(${NAME} PROPERTIES INTERFACE_SOURCES "")
|
||||
file(STRINGS vendor/${NAME}/files.txt FILES)
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/vendor/${NAME}/files.txt" FILES)
|
||||
foreach(FILE IN LISTS FILES)
|
||||
target_sources(${NAME} ${SOURCE_TYPE} "${CMAKE_SOURCE_DIR}/vendor/${NAME}/${FILE}")
|
||||
target_sources(${NAME} ${SOURCE_TYPE} "${CMAKE_CURRENT_SOURCE_DIR}/vendor/${NAME}/${FILE}")
|
||||
endforeach()
|
||||
target_include_directories(${NAME} ${INCLUDE_TYPE} vendor/${NAME}/include)
|
||||
target_include_directories(${NAME} ${INCLUDE_TYPE} "${CMAKE_CURRENT_SOURCE_DIR}/vendor/${NAME}/include")
|
||||
create_source_groups(${NAME})
|
||||
endfunction()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user