Browse Source

CMake: enable PIC by default when building static libs/plugins.

Common use case is to have static libraries and dynamic plugins, which
means that the static libraries need to have PIC enabled.
pull/126/head
Vladimír Vondruš 11 years ago
parent
commit
6ebe8fb131
  1. 6
      CMakeLists.txt

6
CMakeLists.txt

@ -121,10 +121,10 @@ if(BUILD_DEPRECATED)
endif()
option(BUILD_STATIC "Build static libraries (default are shared)" OFF)
option(BUILD_STATIC_PIC "Build static libraries and plugins with position-independent code" OFF)
option(BUILD_STATIC_PIC "Build static libraries and plugins with position-independent code" ON)
option(BUILD_PLUGINS_STATIC "Build static plugins (default are dynamic)" OFF)
option(BUILD_TESTS "Build unit tests." OFF)
cmake_dependent_option(BUILD_GL_TESTS "Build unit tests for OpenGL code." OFF "BUILD_TESTS" OFF)
option(BUILD_TESTS "Build unit tests" OFF)
cmake_dependent_option(BUILD_GL_TESTS "Build unit tests for OpenGL code" OFF "BUILD_TESTS" OFF)
if(BUILD_TESTS)
enable_testing()
endif()

Loading…
Cancel
Save