diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e2bf7e3da33..b47a7dc3b8f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,37 +2,37 @@ version: 2 jobs: linux_x86_64: docker: - - image: debian:stretch-backports + - image: debian:stretch working_directory: ~/repo steps: - checkout - run: apt-get update -y - - run: apt-get install -y -t stretch-backports cmake g++ libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsodium-dev + - run: apt-get install -y cmake g++ libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsodium-dev - run: mkdir build - run: cd build && cmake .. - run: cd build && make -j$(nproc) - store_artifacts: {path: ./build/devilutionx, destination: devilutionx_linux_x86_64} linux_x86: docker: - - image: debian:stretch-backports + - image: debian:stretch working_directory: ~/repo steps: - checkout - run: dpkg --add-architecture i386 - run: apt-get update -y - - run: apt-get install -y -t stretch-backports cmake g++-multilib libsdl2-dev:i386 libsdl2-mixer-dev:i386 libsdl2-ttf-dev:i386 libsodium-dev libsodium-dev:i386 + - run: apt-get install -y cmake g++-multilib libsdl2-dev:i386 libsdl2-mixer-dev:i386 libsdl2-ttf-dev:i386 libsodium-dev libsodium-dev:i386 - run: mkdir build - run: cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../CMake/32bit.cmake .. - run: cd build && make -j$(nproc) - store_artifacts: {path: ./build/devilutionx, destination: devilutionx_linux_x86} windows_x86: docker: - - image: debian:stretch-backports + - image: debian:stretch working_directory: ~/repo steps: - checkout - run: apt-get update -y - - run: apt-get install -y -t stretch-backports cmake gcc-mingw-w64-i686 g++-mingw-w64-i686 wget + - run: apt-get install -y cmake gcc-mingw-w64-i686 g++-mingw-w64-i686 wget - run: wget https://www.libsdl.org/release/SDL2-devel-2.0.9-mingw.tar.gz - run: tar -xzf SDL2-devel-2.0.9-mingw.tar.gz - run: wget https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-mingw.tar.gz diff --git a/CMake/mingwcc.cmake b/CMake/mingwcc.cmake index 3e592e9944b3..44865ae9d63a 100644 --- a/CMake/mingwcc.cmake +++ b/CMake/mingwcc.cmake @@ -5,9 +5,6 @@ SET(CMAKE_SYSTEM_NAME Windows) # workaround list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "${CROSS_PREFIX}/i686-w64-mingw32/include") -set(ASAN OFF) -set(DIST ON) - SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc") SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++") diff --git a/CMakeLists.txt b/CMakeLists.txt index 78734f4206e4..d086ac03aedf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.7) include(CMake/out_of_tree.cmake) @@ -35,6 +35,11 @@ if(NIGHTLY_BUILD) set(FASTER ON) endif() +if(WIN32) + set(ASAN OFF) + set(DIST ON) +endif() + if(DIST) set(sodium_USE_STATIC_LIBS ON) endif() @@ -67,7 +72,7 @@ add_library(Radon STATIC 3rdParty/Radon/Radon/source/Named.cpp 3rdParty/Radon/Radon/source/Section.cpp) -add_library(StormLib OBJECT +add_library(StormLib STATIC 3rdParty/StormLib/src/FileStream.cpp 3rdParty/StormLib/src/SBaseCommon.cpp 3rdParty/StormLib/src/SBaseFileTable.cpp @@ -80,11 +85,11 @@ add_library(StormLib OBJECT 3rdParty/StormLib/src/SFileOpenFileEx.cpp 3rdParty/StormLib/src/SFileReadFile.cpp) -add_library(PKWare OBJECT +add_library(PKWare STATIC 3rdParty/PKWare/explode.cpp 3rdParty/PKWare/implode.cpp) -add_library(devilution OBJECT +add_library(devilution STATIC Source/appfat.cpp Source/automap.cpp Source/capture.cpp diff --git a/xcode-build.sh b/xcode-build.sh index 0756fc0c423e..665e1767a292 100755 --- a/xcode-build.sh +++ b/xcode-build.sh @@ -125,7 +125,6 @@ function build_all_x86 (){ function build_all_x64 (){ brew install sdl2 sdl2_mixer sdl2_ttf libsodium - brew upgrade cmake mkdir build cd build cmake ..