From 592e3c3ffeda842e09061713d324e4a0f1466f0d Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 12 Jul 2020 10:19:21 +0200 Subject: [PATCH] Found a better way to remove -fPIC flag for Windows build. --- .drone.yml | 1 - CMakeLists.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a21ba8c..c6b18af 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,7 +31,6 @@ steps: image: deukhoofd/windowsbuilder commands: - cmake -DCMAKE_BUILD_TYPE=Release . -B build-release-windows -D CMAKE_C_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang -D CMAKE_CXX_COMPILER=/home/wclang/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-clang++ -DWINDOWS=ON -DSTATICC=ON - - sed -i 's/-fPIC//g' build-release-windows/CMakeFiles/Arbutils.dir/flags.make - cmake --build build-release-windows --target all -- -j 4 - export WINEARCH=win64 - wine build-release-windows/ArbutilsTests.exe -s diff --git a/CMakeLists.txt b/CMakeLists.txt index c50ce35..a1439ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ find_package(Threads) if (WINDOWS) ADD_DEFINITIONS(-D WINDOWS=1) + set(CMAKE_POSITION_INDEPENDENT_CODE 0) endif (WINDOWS) file(GLOB_RECURSE SRC_FILES "src/*.cpp" "src/*.hpp" "CInterface/*.cpp")