From 2a255e49e2d0d654e8764848c61a26de95ed7292 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 7 Oct 2014 12:48:01 +0200 Subject: [PATCH] Made static library build with -fPIC for Rust. Fixes #199. --- CMakeLists.txt | 2 +- README.md | 2 ++ src/CMakeLists.txt | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f827aa29..809e8ee8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ project(GLFW C) -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 2.8.9) set(GLFW_VERSION_MAJOR "3") set(GLFW_VERSION_MINOR "1") diff --git a/README.md b/README.md index b733fcbe..bc13cad9 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,8 @@ GLFW bundles a number of dependencies in the `deps/` directory. - Added *partial and experimental* support for Wayland - Changed the default of `GLFW_REFRESH_RATE` to `GLFW_DONT_CARE` to maintain the default behavior + - Changed static library to build as position independent code for easier use + from the Rust language - Bugfix: The debug context attribute was set from `GL_ARB_debug_output` even when a debug context had not been requested - Bugfix: The particles example was not linked against the threading library diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4a390b17..b1279f23 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -53,7 +53,8 @@ if (APPLE) endif() add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS}) -set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}") +set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}" + POSITION_INDEPENDENT_CODE ON) if (BUILD_SHARED_LIBS) # Include version information in the output