Browse Source

Merge pull request #2099 from ioangogo/LinuxCaptionFix

cmake: Compile option to fix libcaption linking
Jim 6 years ago
parent
commit
7d34034ee2
2 changed files with 5 additions and 1 deletions
  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)