From 56738de192e3a5155d384c0c16edb1c8b057c682 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Sat, 25 Apr 2020 05:05:43 +0800 Subject: [PATCH] [sdl2-gfx] Fix build error on non windows (#10575) * [sdl2-gfx] Fix build error on non windows * Update as review suggestions * Updated to support osx --- ports/sdl2-gfx/CMakeLists.txt | 4 +++- ports/sdl2-gfx/CONTROL | 4 ++-- ports/sdl2-gfx/portfile.cmake | 5 +---- scripts/ci.baseline.txt | 2 -- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ports/sdl2-gfx/CMakeLists.txt b/ports/sdl2-gfx/CMakeLists.txt index cceab96cf..9c94b9b22 100644 --- a/ports/sdl2-gfx/CMakeLists.txt +++ b/ports/sdl2-gfx/CMakeLists.txt @@ -24,7 +24,9 @@ target_include_directories(${PROJECT_NAME} PUBLIC $ ) -target_compile_definitions(${PROJECT_NAME} PRIVATE ${SDL_GFX_DEFINES}) +if(WIN32) + add_compile_definitions(${SDL_GFX_DEFINES}) +endif() target_include_directories(${PROJECT_NAME} PRIVATE ${SDL_INCLUDE_DIR}/SDL2) target_link_libraries(${PROJECT_NAME} PRIVATE SDL2::SDL2) diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL index bd6b4f6b2..9a69a4558 100644 --- a/ports/sdl2-gfx/CONTROL +++ b/ports/sdl2-gfx/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-gfx -Version: 1.0.4-5 +Version: 1.0.4-6 Build-Depends: sdl2 -Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. +Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. \ No newline at end of file diff --git a/ports/sdl2-gfx/portfile.cmake b/ports/sdl2-gfx/portfile.cmake index 802b1a2c5..383192053 100644 --- a/ports/sdl2-gfx/portfile.cmake +++ b/ports/sdl2-gfx/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(VERSION 1.0.4) vcpkg_download_distfile(ARCHIVE @@ -28,7 +26,6 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/COPYING ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() \ No newline at end of file diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index efaddf1ce..d1a8ffa8d 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1634,8 +1634,6 @@ sdformat6:x64-linux=ignore sdl1:arm-uwp=fail sdl1:x64-uwp=fail sdl1:x64-osx=fail -sdl2-gfx:x64-linux=fail -sdl2-gfx:x64-osx=fail sdl2-image:arm-uwp=fail sdl2-image:x64-uwp=fail sdl2-mixer:arm-uwp=fail