diff --git a/.gitignore b/.gitignore index a5c2c1e7..6fa1e9c2 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,4 @@ test/baseline/.cache .vscode ios/TGFX mac/TGFX +/TGFX diff --git a/CMakeLists.txt b/CMakeLists.txt index 17b5ad91..8e3da1bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -371,10 +371,10 @@ elseif (CMAKE_HOST_SYSTEM_NAME MATCHES "Linux") endif () endif () -add_vendor_target(TGFX STATIC_VENDORS ${TGFX_STATIC_VENDORS} SHARED_VENDORS ${TGFX_SHARED_VENDORS}) +add_vendor_target(tgfx-vendor STATIC_VENDORS ${TGFX_STATIC_VENDORS} SHARED_VENDORS ${TGFX_SHARED_VENDORS}) +find_vendor_libraries(tgfx-vendor STATIC TGFX_VENDOR_STATIC_LIBRARIES SHARED TGFX_VENDOR_SHARED_LIBRARIES) list(APPEND TGFX_STATIC_LIBS ${TGFX_VENDOR_STATIC_LIBRARIES}) list(APPEND TGFX_SHARED_LIBS ${TGFX_VENDOR_SHARED_LIBRARIES}) -list(APPEND TGFX_VENDOR_TARGETS ${TGFX_VENDOR_TARGET}) if (HasParent) set(TGFX_STATIC_LIBS ${TGFX_STATIC_LIBS} PARENT_SCOPE) @@ -392,7 +392,8 @@ if (TGFX_EXCLUDE_FILES) list(REMOVE_ITEM TGFX_FILES ${TGFX_EXCLUDE_FILES}) endif () -add_library(tgfx STATIC ${TGFX_VENDOR_TARGETS} ${TGFX_FILES}) +add_library(tgfx STATIC ${TGFX_FILES}) +add_dependencies(tgfx tgfx-vendor) target_compile_definitions(tgfx PUBLIC ${TGFX_DEFINES}) target_compile_options(tgfx PUBLIC ${TGFX_COMPILE_OPTIONS}) target_include_directories(tgfx PUBLIC include PRIVATE src) @@ -401,6 +402,7 @@ merge_libraries_into(tgfx ${TGFX_STATIC_LIBS}) target_link_libraries(tgfx ${TGFX_SHARED_LIBS}) set_target_properties(tgfx PROPERTIES PREFIX "") + if (TGFX_BUILD_DRAWERS) file(GLOB_RECURSE DRAWER_FILES drawers/src/*.*) add_library(tgfx-drawers STATIC ${DRAWER_FILES}) @@ -428,9 +430,9 @@ if (TGFX_BUILD_TESTS) list(APPEND TGFX_TEST_LIBS tgfx-drawers tgfx ${TGFX_SHARED_LIBS}) list(APPEND TGFX_TEST_INCLUDES src test/src third_party/json/include) - add_vendor_target(TEST STATIC_VENDORS harfbuzz googletest) + add_vendor_target(test-vendor STATIC_VENDORS harfbuzz googletest) + find_vendor_libraries(test-vendor STATIC TEST_VENDOR_STATIC_LIBRARIES) list(APPEND TGFX_TEST_LIBS ${TEST_VENDOR_STATIC_LIBRARIES}) - list(APPEND TGFX_TEST_VENDOR_TARGETS ${TEST_VENDOR_TARGET}) list(APPEND TGFX_TEST_INCLUDES third_party/harfbuzz/src third_party/googletest/googletest @@ -451,7 +453,8 @@ if (TGFX_BUILD_TESTS) endif () # used to update the local md5 data for baseline testing. - add_executable(UpdateBaseline ${TGFX_TEST_VENDOR_TARGETS} ${TGFX_TEST_FILES}) + add_executable(UpdateBaseline ${TGFX_TEST_FILES}) + add_dependencies(UpdateBaseline test-vendor) target_include_directories(UpdateBaseline PUBLIC ${TGFX_TEST_INCLUDES}) target_compile_definitions(UpdateBaseline PUBLIC ${TGFX_TEST_DEFINES} UPDATE_BASELINE) target_compile_options(UpdateBaseline PUBLIC ${TGFX_TEST_COMPILE_OPTIONS}) @@ -459,21 +462,24 @@ if (TGFX_BUILD_TESTS) target_link_libraries(UpdateBaseline ${TGFX_TEST_LIBS}) # used to generate baseline images to the out/ directory. each image has a "_base" suffix. - add_executable(GenerateImages ${TGFX_TEST_VENDOR_TARGETS} ${TGFX_TEST_FILES}) + add_executable(GenerateImages ${TGFX_TEST_FILES}) + add_dependencies(GenerateImages test-vendor) target_include_directories(GenerateImages PUBLIC ${TGFX_TEST_INCLUDES}) target_compile_definitions(GenerateImages PUBLIC ${TGFX_TEST_DEFINES} GENERATOR_BASELINE_IMAGES) target_compile_options(GenerateImages PUBLIC ${TGFX_TEST_COMPILE_OPTIONS}) target_link_options(GenerateImages PUBLIC ${TGFX_TEST_LINK_OPTIONS}) target_link_libraries(GenerateImages ${TGFX_TEST_LIBS}) - add_executable(TGFXUnitTest ${TGFX_TEST_VENDOR_TARGETS} ${TGFX_TEST_FILES}) + add_executable(TGFXUnitTest ${TGFX_TEST_FILES}) + add_dependencies(TGFXUnitTest test-vendor) target_include_directories(TGFXUnitTest PUBLIC ${TGFX_TEST_INCLUDES}) target_compile_definitions(TGFXUnitTest PUBLIC ${TGFX_TEST_DEFINES} SKIP_FRAME_COMPARE) target_compile_options(TGFXUnitTest PUBLIC ${TGFX_TEST_COMPILE_OPTIONS}) target_link_options(TGFXUnitTest PUBLIC ${TGFX_TEST_LINK_OPTIONS}) target_link_libraries(TGFXUnitTest ${TGFX_TEST_LIBS}) - add_executable(TGFXFullTest ${TGFX_TEST_VENDOR_TARGETS} ${TGFX_TEST_FILES}) + add_executable(TGFXFullTest ${TGFX_TEST_FILES}) + add_dependencies(TGFXFullTest test-vendor) target_compile_definitions(TGFXFullTest PUBLIC ${TGFX_TEST_DEFINES}) target_compile_options(TGFXFullTest PUBLIC ${TGFX_TEST_COMPILE_OPTIONS}) target_include_directories(TGFXFullTest PUBLIC ${TGFX_TEST_INCLUDES}) diff --git a/DEPS b/DEPS index 7259d59c..ad24253d 100644 --- a/DEPS +++ b/DEPS @@ -7,7 +7,7 @@ "common": [ { "url": "${PAG_GROUP}/vendor_tools.git", - "commit": "9787ea5507fe62bb02cb4de49cf5a87cfffbc1df", + "commit": "9f9e7ce5d0e5dcda8f9dbff0dc5115ed033ecae8", "dir": "third_party/vendor_tools" }, {