From 88e6bac238583fbaa7fd08f2f6a047f632c2e17b Mon Sep 17 00:00:00 2001 From: Jordan Dialpuri <44945647+Dialpuri@users.noreply.github.com> Date: Fri, 6 Sep 2024 10:58:47 +0100 Subject: [PATCH] Added FPIC --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3817acb..7c724d16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ set(PRIVATEER_CC_FLAGS "-O2 -w") set(PRIVATEER_CXX_FLAGS "-O2 -w -I${CMAKE_INSTALL_PREFIX}/include") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PRIVATEER_CC_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PRIVATEER_CXX_FLAGS} ") +set(CMAKE_POSITION_INDEPENDENT_CODE ON) option(BUILD_SHARED_LIBS "Build as a shared library" ON) set(CMAKE_CXX_STANDARD 11) @@ -83,6 +84,7 @@ include_directories( ${ccp4-dependencies_SOURCE_DIR} ${PRIVATEER_SOURCE_DIR}/cpp ${PRIVATEER_SOURCE_DIR}/cpp/pybind11) + link_directories( ${CMAKE_BINARY_DIR}/mmdb2 ${CMAKE_BINARY_DIR}/clipper