CMakeLists.txt 865 Bytes
Newer Older
Andreas Schmidt's avatar
Andreas Schmidt committed
1
set (UTIL_SOURCES ../defines.h
Andreas Schmidt's avatar
Andreas Schmidt committed
2 3 4 5 6 7
        common.c common.h
        list.c list.h
        pipe.c pipe.h
        dbg.h
        bptree.c bptree.h
        bitmap.c bitmap.h
8
        time.c time.h
Andreas Schmidt's avatar
Andreas Schmidt committed
9
        mpsc_queue.c mpsc_queue.h
Andreas Schmidt's avatar
Andreas Schmidt committed
10
        windowedFilter.c windowedFilter.h)
Andreas Schmidt's avatar
Andreas Schmidt committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

add_library(prrtUtil_obj OBJECT ${UTIL_SOURCES})
set_property(TARGET prrtUtil_obj PROPERTY C_STANDARD 99)

add_library(prrtUtil_shared SHARED $<TARGET_OBJECTS:prrtUtil_obj>)
set_target_properties(prrtUtil_shared PROPERTIES OUTPUT_NAME "prrtUtil")

add_library(prrtUtil_static SHARED $<TARGET_OBJECTS:prrtUtil_obj>)
set_target_properties(prrtUtil_static PROPERTIES OUTPUT_NAME "prrtUtil")

target_link_libraries(prrtUtil_shared ${M_LIB})
target_link_libraries(prrtUtil_static ${M_LIB})

install(TARGETS prrtUtil_shared prrtUtil_static
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib)