Explorar o código

Merge pull request #2099 from ioangogo/LinuxCaptionFix

cmake: Compile option to fix libcaption linking
Jim %!s(int64=6) %!d(string=hai) anos
pai
achega
7d34034ee2
Modificáronse 2 ficheiros con 5 adicións e 1 borrados
  1. 1 1
      CI/before-script-linux.sh
  2. 4 0
      deps/libcaption/CMakeLists.txt

+ 1 - 1
CI/before-script-linux.sh

@@ -8,4 +8,4 @@ fi
 set -ex
 ccache -s || echo "CCache is not available."
 mkdir build && cd build
-cmake ..
+cmake -DBUILD_CAPTIONS=ON ..

+ 4 - 0
deps/libcaption/CMakeLists.txt

@@ -5,6 +5,10 @@ if (WIN32)
   add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 endif()
 
+if (UNIX AND NOT APPLE)
+  add_compile_options("-fPIC")
+endif()
+
 # Don't need to prefix local includes with "caption/*"
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/caption)