summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/mbgl.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmake/mbgl.cmake b/cmake/mbgl.cmake
index 338c2fd708..bb029a47db 100644
--- a/cmake/mbgl.cmake
+++ b/cmake/mbgl.cmake
@@ -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()