diff options
author | Tom Rondeau <tom@trondeau.com> | 2014-06-27 15:10:31 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2014-06-28 13:58:57 -0400 |
commit | 0099eb9bd7a11afdf9276d6f4a5dafa757ebdb7c (patch) | |
tree | b278b8598719ce8a1284b1707c49d4e39c1a639c /gnuradio-runtime/lib/pmt/CMakeLists.txt | |
parent | 3d8a19b55a15a285d5a95d1e786cb93e26cb4f3a (diff) |
build: adds an ENABLE_STATIC_LIB option to cmake to build static (.a) versions of the libraries.
Diffstat (limited to 'gnuradio-runtime/lib/pmt/CMakeLists.txt')
-rw-r--r-- | gnuradio-runtime/lib/pmt/CMakeLists.txt | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt index 193ccbe62f..32c0e57a6a 100644 --- a/gnuradio-runtime/lib/pmt/CMakeLists.txt +++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt @@ -86,7 +86,7 @@ list(APPEND gnuradio_pmt_libs ${LOG4CPP_LIBRARIES} ) -add_custom_target(pmt_generated +add_custom_target(pmt_generated DEPENDS ${PMT_SERIAL_TAGS_H} ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv_int.h) @@ -114,6 +114,21 @@ add_dependencies(gnuradio-pmt pmt_generated ) +if(ENABLE_STATIC_LIBS) + add_library(gnuradio-pmt_static STATIC ${pmt_sources}) + + add_dependencies(gnuradio-pmt_static pmt_generated) + + if(NOT WIN32) + set_target_properties(gnuradio-pmt_static + PROPERTIES OUTPUT_NAME gnuradio-pmt) + endif(NOT WIN32) + + install(TARGETS gnuradio-pmt_static + ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "runtime_devel" # .lib file + ) +endif(ENABLE_STATIC_LIBS) + ######################################################################## # Setup tests ######################################################################## @@ -133,7 +148,7 @@ include_directories(${CPPUNIT_INCLUDE_DIRS}) link_directories(${CPPUNIT_LIBRARY_DIRS}) add_library(test-gnuradio-pmt SHARED ${test_gnuradio_pmt_sources}) -target_link_libraries(test-gnuradio-pmt gnuradio-runtime gnuradio-pmt +target_link_libraries(test-gnuradio-pmt gnuradio-runtime gnuradio-pmt ${CPPUNIT_LIBRARIES} ${Boost_LIBRARIES} ${LOG4CPP_LIBRARIES}) ######################################################################## |