Fix linking on MacOS
authorPiotr Byszewski <piotr.byszewski@mobica.com>
Tue, 6 Apr 2021 12:19:04 +0000 (14:19 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 22 Apr 2021 07:09:48 +0000 (07:09 +0000)
This change resolves linking issue on MacOS and adds this
platform to vulkan cts readme.

Components: Framework

Affects:
*

Change-Id: I355d9f08f0b3bd457fddb7f889ffe4ec1969e346

external/vulkancts/README.md
framework/platform/CMakeLists.txt

index 5f33878..2acf5a9 100644 (file)
@@ -29,6 +29,13 @@ The following tools must be installed and present in the PATH variable:
    file.
     * You can get this from the `mesa-common-dev` Ubuntu package.
 
+### MacOS
+
+ * Xcode
+
+Vulkan SDK for macOS includes a MoltenVK runtime library which is recommended method for
+developing a Vulkan application.
+
 ### Android
 
  * Android NDK r17c or later.
@@ -85,6 +92,12 @@ If building for 32-bit x86 with GCC, you probably also want to add `-msse2
        cmake <path to vulkancts> -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_FLAGS=-m64
        make -j
 
+
+### MacOS 64-bit Debug
+
+       cmake <path to vulkancts> -DCMAKE_BUILD_TYPE=Debug -DDEQP_TARGET=osx -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_FLAGS=-m64
+       make -j
+
 ### Android
 
 Following command will build dEQP.apk:
@@ -200,6 +213,11 @@ Test log will be written into TestResults.qpa
        cd <builddir>/external/vulkancts/modules/vulkan
        ./deqp-vk --deqp-caselist-file=...
 
+### MacOS
+
+       cd <builddir>/external/vulkancts/modules/vulkan
+       ./deqp-vk --deqp-caselist-file=...
+
 ### Android
 
        adb push <vulkancts>/external/vulkancts/mustpass/master/vk-default.txt /sdcard/vk-default.txt
index 260950a..536dddd 100644 (file)
@@ -137,6 +137,7 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
                        osx/tcuOSXMetalView.mm
                        osx/tcuOSXMetalView.hpp
                        )
+               list(APPEND TCUTIL_PLATFORM_LIBS ${QUARTZCORE_LIBRARY} ${COCOA_LIBRARY})
 
        else ()
                set(TCUTIL_PLATFORM_SRCS