aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index fd316221c..78cce3e97 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -136,6 +136,7 @@ endif(ENABLE_C_API)
# Add common resource compiler subdirectory
########################################################################
add_subdirectory(rc)
+LIBUHD_APPEND_LIBS(uhd_rc)
########################################################################
# Add DLL resource file to Windows build
@@ -179,7 +180,7 @@ if(ENABLE_MPMD)
list(APPEND libuhd_sources $<TARGET_OBJECTS:uhd_rpclib>)
endif()
add_library(uhd SHARED ${libuhd_sources})
-target_link_libraries(uhd ${Boost_LIBRARIES} ${libuhd_libs} uhd_rc)
+target_link_libraries(uhd ${Boost_LIBRARIES} ${libuhd_libs})
set_target_properties(uhd PROPERTIES DEFINE_SYMBOL "UHD_DLL_EXPORTS")
if(NOT LIBUHDDEV_PKG)
set_target_properties(uhd PROPERTIES SOVERSION "${UHD_ABI_VERSION}")
@@ -221,9 +222,10 @@ endif(NOT UHDHOST_PKG)
# Setup libuhd library (static)
#######################################################
if(ENABLE_STATIC_LIBS)
- add_library(uhd_static STATIC ${libuhd_sources})
+ add_library(uhd_static STATIC ${libuhd_sources} $<TARGET_OBJECTS:uhd_rc>)
set_target_properties(uhd_static PROPERTIES OUTPUT_NAME uhd)
set_target_properties(uhd_static PROPERTIES COMPILE_DEFINITIONS UHD_STATIC_LIB)
+ target_link_libraries(uhd_static uhd_rc)
install(TARGETS uhd_static
ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib or .a file
)