diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-06-27 15:01:54 -0700 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2018-07-03 10:03:05 -0700 |
commit | 251f5e605f1f1bb3e56115f8cef66cacabfd9d83 (patch) | |
tree | 55c81152898be05016ed8a55e975e0998719191d /cmake/mbgl.cmake | |
parent | 71a72d269a3f0de6f3cdb7780d2bf44f6a4e2c21 (diff) | |
download | qtlocation-mapboxgl-251f5e605f1f1bb3e56115f8cef66cacabfd9d83.tar.gz |
[core, vendor] Create vendored nunicode 1.8.
- Version bump to 1.8 necessary for "unaccent" functionality
- Qt now depends on nunicode, ruling out use of precompiled binaries
Diffstat (limited to 'cmake/mbgl.cmake')
-rw-r--r-- | cmake/mbgl.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cmake/mbgl.cmake b/cmake/mbgl.cmake index c833fc4a20..f67fbd3b4f 100644 --- a/cmake/mbgl.cmake +++ b/cmake/mbgl.cmake @@ -107,6 +107,25 @@ function(create_source_groups target) endforeach() endfunction() +# Creates a library target for a vendored dependency +function(add_vendor_target NAME TYPE) + add_library(${NAME} ${TYPE} cmake/empty.cpp) + set(INCLUDE_TYPE "INTERFACE") + set(SOURCE_TYPE "INTERFACE") + if (TYPE STREQUAL "STATIC" OR TYPE STREQUAL "SHARED") + set(INCLUDE_TYPE "PUBLIC") + set(SOURCE_TYPE "PRIVATE") + set_target_properties(${NAME} PROPERTIES SOURCES "") + endif() + set_target_properties(${NAME} PROPERTIES INTERFACE_SOURCES "") + file(STRINGS vendor/${NAME}/files.txt FILES) + foreach(FILE IN LISTS FILES) + target_sources(${NAME} ${SOURCE_TYPE} "${CMAKE_SOURCE_DIR}/vendor/${NAME}/${FILE}") + endforeach() + target_include_directories(${NAME} ${INCLUDE_TYPE} vendor/${NAME}/include) + create_source_groups(${NAME}) +endfunction() + # This little macro lets you set any XCode specific property macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE) set_property(TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE}) |