From 29d1190fd113afc37b9223dee1919808bd881588 Mon Sep 17 00:00:00 2001 From: James Benton Date: Fri, 25 May 2018 12:22:39 +0100 Subject: [PATCH] appveyor attempt #1 --- CMakeLists.txt | 2 ++ appveyor.yml | 32 +++++++++++++++++++++++++++++++- share/wut.toolchain.cmake | 15 ++++++++++----- 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 273c968..8b3e575 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ add_subdirectory(tools) externalproject_add(cafe SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cafe" + CMAKE_GENERATOR "Unix Makefiles" INSTALL_DIR "${WUT_STAGING}" CMAKE_CACHE_ARGS -DWUT_RPLGEN:filepath=$ @@ -46,6 +47,7 @@ externalproject_add(cafe externalproject_add(libraries SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries" + CMAKE_GENERATOR "Unix Makefiles" INSTALL_DIR "${WUT_STAGING}" CMAKE_CACHE_ARGS -DWUT_ROOT:filepath=${WUT_ROOT} diff --git a/appveyor.yml b/appveyor.yml index b298b23..4225da9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,4 +10,34 @@ platform: configuration: - Release -build: off +install: + - git submodule update --init --recursive + - appveyor DownloadFile https://kent.dl.sourceforge.net/project/gnuwin32/make/3.81/make-3.81-bin.zip + - 7z x make-3.81-bin.zip -oC:\make + - appveyor DownloadFile https://netix.dl.sourceforge.net/project/gnuwin32/make/3.81/make-3.81-dep.zip + - 7z x make-3.81-dep.zip -oC:\make + - set PATH=%PATH%;C:/make/bin + - appveyor DownloadFile https://downloads.devkitpro.org/msys-2.10.0.7z + - 7z x msys-2.10.0.7z -oC:\msys2 + - C:\msys2\msys2\usr\bin\bash.exe --login -c exit + - C:\msys2\msys2\usr\bin\pacman.exe -Syu --noconfirm + - C:\msys2\msys2\usr\bin\pacman.exe -S devkitPPC --noconfirm --needed + - set DEVKITPPC=C:\msys2\msys2\opt\devkitpro\devkitPPC + - vcpkg install zlib:x64-windows + - vcpkg integrate install + +before_build: + - mkdir build + - cd build + - cmake -DCMAKE_INSTALL_PREFIX=install -G "Visual Studio 15 2017 Win64" ../ + +build_script: + - msbuild INSTALL.vcxproj /p:Configuration=Release /p:Platform=x64 + +after_build: + - cd install + - 7z a wut.zip . + +artifacts: + - path: build\install\wut.zip + name: wut diff --git a/share/wut.toolchain.cmake b/share/wut.toolchain.cmake index cb94723..3325127 100644 --- a/share/wut.toolchain.cmake +++ b/share/wut.toolchain.cmake @@ -15,11 +15,16 @@ if(NOT WUT_ROOT) get_filename_component(WUT_ROOT ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) endif() -set(CMAKE_ASM_COMPILER "${DEVKITPPC}/bin/powerpc-eabi-gcc" CACHE PATH "") -set(CMAKE_C_COMPILER "${DEVKITPPC}/bin/powerpc-eabi-gcc" CACHE PATH "") -set(CMAKE_CXX_COMPILER "${DEVKITPPC}/bin/powerpc-eabi-g++" CACHE PATH "") -set(CMAKE_LINKER "${DEVKITPPC}/bin/powerpc-eabi-ld" CACHE PATH "") -set(CMAKE_AR "${DEVKITPPC}/bin/powerpc-eabi-ar" CACHE PATH "") +if(WIN32) + # Because "Unix Makefiles" generator does not set this, even if on Windows + set(CMAKE_EXECUTABLE_SUFFIX ".exe") +endif() + +set(CMAKE_ASM_COMPILER "${DEVKITPPC}/bin/powerpc-eabi-gcc${CMAKE_EXECUTABLE_SUFFIX}" CACHE PATH "") +set(CMAKE_C_COMPILER "${DEVKITPPC}/bin/powerpc-eabi-gcc${CMAKE_EXECUTABLE_SUFFIX}" CACHE PATH "") +set(CMAKE_CXX_COMPILER "${DEVKITPPC}/bin/powerpc-eabi-g++${CMAKE_EXECUTABLE_SUFFIX}" CACHE PATH "") +set(CMAKE_LINKER "${DEVKITPPC}/bin/powerpc-eabi-ld${CMAKE_EXECUTABLE_SUFFIX}" CACHE PATH "") +set(CMAKE_AR "${DEVKITPPC}/bin/powerpc-eabi-ar${CMAKE_EXECUTABLE_SUFFIX}" CACHE PATH "") set(WUT_C_FLAGS "-mcpu=750 -meabi -mhard-float -Wl,-q \"-I${WUT_ROOT}/include\"") set(CMAKE_C_FLAGS "${WUT_C_FLAGS}" CACHE STRING "")