From 0aee1fa97acab18ce41fd2e03851624f79f6657b Mon Sep 17 00:00:00 2001 From: Jim Huang Date: Sat, 5 Nov 2011 02:24:39 +0800 Subject: CMake: add -fPIC flag to combine static libraries to dynamic one Machines running Linux on architectures such as amd64 require flag "-fPIC" to be specified to compile shared libraries, and it would be helpful to have this a default for CMake when building libpinyin. --- src/lookup/CMakeLists.txt | 4 ++++ src/storage/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/lookup/CMakeLists.txt b/src/lookup/CMakeLists.txt index bb5b8ba..bd29b4a 100644 --- a/src/lookup/CMakeLists.txt +++ b/src/lookup/CMakeLists.txt @@ -1,3 +1,7 @@ +set( + CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" +) + set( LIBLOOKUP_HEADERS lookup.h diff --git a/src/storage/CMakeLists.txt b/src/storage/CMakeLists.txt index b775350..59f6bfd 100644 --- a/src/storage/CMakeLists.txt +++ b/src/storage/CMakeLists.txt @@ -1,3 +1,7 @@ +set( + CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" +) + set( LIBSTORAGE_HEADERS pinyin_large_table.h -- cgit