diff options
author | Baruch Sterin <baruchs@gmail.com> | 2015-11-05 01:23:32 -0800 |
---|---|---|
committer | Baruch Sterin <baruchs@gmail.com> | 2015-11-05 01:23:32 -0800 |
commit | ba931c1b4a23ca769feae37acda763fa2260da5c (patch) | |
tree | 88ae82d716a60d4189c9c1d071378ef025c75676 | |
parent | 5761c76825380200a82f33e776f1e07ff3d3fd4c (diff) | |
download | abc-ba931c1b4a23ca769feae37acda763fa2260da5c.tar.gz abc-ba931c1b4a23ca769feae37acda763fa2260da5c.tar.bz2 abc-ba931c1b4a23ca769feae37acda763fa2260da5c.zip |
CMakeLists.txt: add a new target libabc-pic, a library compiled with -fPIC, not complied by default
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c47da11a..7d947959 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,3 +56,10 @@ endfunction() add_executable(abc ${ABC_SRC}) abc_properties(abc PRIVATE) +list(REMOVE_ITEM ABC_SRC src/base/main/main.c) + +add_library(libabc-pic EXCLUDE_FROM_ALL ${ABC_SRC}) +abc_properties(libabc-pic PUBLIC) + +set_property(TARGET libabc-pic PROPERTY POSITION_INDEPENDENT_CODE ON) +set_property(TARGET libabc-pic PROPERTY OUTPUT_NAME abc-pic) |