CMakeLists.txt: add a new target libabc-pic, a library compiled with -fPIC, not complied by default

This commit is contained in:
Baruch Sterin 2015-11-05 01:23:32 -08:00
parent 5761c76825
commit ba931c1b4a
1 changed files with 7 additions and 0 deletions

View File

@ -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)