From: derek <derekwbarnett@gmail.com> Date: Thu, 23 Jun 2011 19:35:35 +0000 (-0400) Subject: Fixed -fPIC issue for CentOS users. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=36187632f41f7f995580c35657ceaeaf2c47aa7a;p=bamtools.git Fixed -fPIC issue for CentOS users. * Forced compiler flag that was not being automatically set by CMake on that OS. Had previously set this on API library. Got feedback that it worked there, so I added the flag to Utils & JsonCPP libs as well. --- diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt index 9ba9963..39864c7 100644 --- a/src/api/CMakeLists.txt +++ b/src/api/CMakeLists.txt @@ -10,7 +10,7 @@ include_directories( ${BamTools_SOURCE_DIR}/src ) # add compiler definitions add_definitions( -DBAMTOOLS_API_LIBRARY ) # (for proper exporting of library symbols) -add_definitions( -fPIC ) # (attempt to force PIC compiling on some archs) +add_definitions( -fPIC ) # (attempt to force PIC compiling on CentOS, not being set on shared libs by CMake) # list of all BamTools API source (.cpp) files set( BamToolsAPISources diff --git a/src/third_party/jsoncpp/CMakeLists.txt b/src/third_party/jsoncpp/CMakeLists.txt index 3fc9ec4..9cc442a 100644 --- a/src/third_party/jsoncpp/CMakeLists.txt +++ b/src/third_party/jsoncpp/CMakeLists.txt @@ -7,6 +7,7 @@ # add compiler definitions add_definitions(-DBAMTOOLS_JSONCPP_LIBRARY) # (for proper exporting of library symbols) +add_definitions( -fPIC ) # (attempt to force PIC compiling on CentOS, not being set on shared libs by CMake) # create jsoncpp library add_library ( jsoncpp SHARED diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 5bbe624..fab013a 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -10,6 +10,7 @@ include_directories (${BamTools_SOURCE_DIR}/src/api) # add compiler definitions add_definitions(-DBAMTOOLS_UTILS_LIBRARY) # (for proper exporting of library symbols) +add_definitions( -fPIC ) # (attempt to force PIC compiling on CentOS, not being set on shared libs by CMake) # create BamTools utils library add_library ( BamTools-utils SHARED