diff --git a/lib/src/asn1/CMakeLists.txt b/lib/src/asn1/CMakeLists.txt index ba164a56f..a95fe2b44 100644 --- a/lib/src/asn1/CMakeLists.txt +++ b/lib/src/asn1/CMakeLists.txt @@ -16,7 +16,7 @@ add_library(srsran_asn1 STATIC # ASN1 utils add_library(asn1_utils STATIC asn1_utils.cc) target_link_libraries(asn1_utils srsran_common) -INSTALL(TARGETS asn1_utils DESTINATION ${LIBRARY_DIR}) +install(TARGETS asn1_utils DESTINATION ${LIBRARY_DIR} OPTIONAL) # RRC ASN1 lib add_library(rrc_asn1 STATIC @@ -42,29 +42,29 @@ add_library(rrc_asn1 STATIC # Compile RRC ASN1 optimized for size target_compile_options(rrc_asn1 PRIVATE "-Os") target_link_libraries(rrc_asn1 asn1_utils srsran_common) -INSTALL(TARGETS rrc_asn1 DESTINATION ${LIBRARY_DIR}) +install(TARGETS rrc_asn1 DESTINATION ${LIBRARY_DIR} OPTIONAL) # S1AP ASN1 lib add_library(s1ap_asn1 STATIC s1ap.cc s1ap_utils.cc) target_compile_options(s1ap_asn1 PRIVATE "-Os") target_link_libraries(s1ap_asn1 asn1_utils srsran_common) -INSTALL(TARGETS s1ap_asn1 DESTINATION ${LIBRARY_DIR}) +install(TARGETS s1ap_asn1 DESTINATION ${LIBRARY_DIR} OPTIONAL) # RRC NR ASN1 add_library(rrc_nr_asn1 STATIC rrc_nr.cc rrc_nr_utils.cc) target_compile_options(rrc_nr_asn1 PRIVATE "-Os") target_link_libraries(rrc_nr_asn1 asn1_utils srsran_common) -INSTALL(TARGETS rrc_nr_asn1 DESTINATION ${LIBRARY_DIR}) +install(TARGETS rrc_nr_asn1 DESTINATION ${LIBRARY_DIR} OPTIONAL) # NGAP ASN1 add_library(ngap_nr_asn1 STATIC ngap.cc) target_compile_options(ngap_nr_asn1 PRIVATE "-Os") target_link_libraries(ngap_nr_asn1 asn1_utils srsran_common) -INSTALL(TARGETS ngap_nr_asn1 DESTINATION ${LIBRARY_DIR}) +install(TARGETS ngap_nr_asn1 DESTINATION ${LIBRARY_DIR} OPTIONAL) # NAS 5G add_library(nas_5g_msg STATIC nas_5g_msg.cc nas_5g_ies.cc nas_5g_utils.cc) target_compile_options(nas_5g_msg PRIVATE "-Os") target_link_libraries(nas_5g_msg asn1_utils srsran_common) -INSTALL(TARGETS nas_5g_msg DESTINATION ${LIBRARY_DIR}) +install(TARGETS nas_5g_msg DESTINATION ${LIBRARY_DIR} OPTIONAL) diff --git a/lib/src/common/CMakeLists.txt b/lib/src/common/CMakeLists.txt index 1ddf87b07..c0054503e 100644 --- a/lib/src/common/CMakeLists.txt +++ b/lib/src/common/CMakeLists.txt @@ -51,6 +51,6 @@ target_include_directories(srsran_common PUBLIC ${SEC_INCLUDE_DIRS} ${CMAKE_SOUR target_link_libraries(srsran_common srsran_phy support srslog ${SEC_LIBRARIES} ${BACKWARD_LIBRARIES} ${SCTP_LIBRARIES}) target_compile_definitions(srsran_common PRIVATE ${BACKWARD_DEFINITIONS}) -INSTALL(TARGETS srsran_common DESTINATION ${LIBRARY_DIR}) +install(TARGETS srsran_common DESTINATION ${LIBRARY_DIR} OPTIONAL) add_subdirectory(test) diff --git a/lib/src/gtpu/CMakeLists.txt b/lib/src/gtpu/CMakeLists.txt index a2a9f8ff4..38c500ee2 100644 --- a/lib/src/gtpu/CMakeLists.txt +++ b/lib/src/gtpu/CMakeLists.txt @@ -10,4 +10,4 @@ set(SOURCES gtpu.cc) add_library(srsran_gtpu STATIC ${SOURCES}) target_link_libraries(srsran_gtpu srsran_common srsran_asn1 ${ATOMIC_LIBS}) -INSTALL(TARGETS srsran_gtpu DESTINATION ${LIBRARY_DIR}) +install(TARGETS srsran_gtpu DESTINATION ${LIBRARY_DIR} OPTIONAL) diff --git a/lib/src/mac/CMakeLists.txt b/lib/src/mac/CMakeLists.txt index 1974aee4e..206cc5538 100644 --- a/lib/src/mac/CMakeLists.txt +++ b/lib/src/mac/CMakeLists.txt @@ -10,6 +10,6 @@ SET(SOURCES pdu.cc pdu_queue.cc mac_sch_pdu_nr.cc mac_rar_pdu_nr.cc) add_library(srsran_mac STATIC ${SOURCES}) target_link_libraries(srsran_mac srsran_common) -INSTALL(TARGETS srsran_mac DESTINATION ${LIBRARY_DIR}) +install(TARGETS srsran_mac DESTINATION ${LIBRARY_DIR} OPTIONAL) add_subdirectory(test) \ No newline at end of file diff --git a/lib/src/pdcp/CMakeLists.txt b/lib/src/pdcp/CMakeLists.txt index 2c1f8578f..d3ab45fdc 100644 --- a/lib/src/pdcp/CMakeLists.txt +++ b/lib/src/pdcp/CMakeLists.txt @@ -13,4 +13,4 @@ set(SOURCES pdcp.cc add_library(srsran_pdcp STATIC ${SOURCES}) target_link_libraries(srsran_pdcp srsran_common srsran_asn1 ${ATOMIC_LIBS}) -INSTALL(TARGETS srsran_pdcp DESTINATION ${LIBRARY_DIR}) +install(TARGETS srsran_pdcp DESTINATION ${LIBRARY_DIR} OPTIONAL) diff --git a/lib/src/phy/CMakeLists.txt b/lib/src/phy/CMakeLists.txt index 880e9ef09..c11ff47de 100644 --- a/lib/src/phy/CMakeLists.txt +++ b/lib/src/phy/CMakeLists.txt @@ -47,4 +47,4 @@ set(srsran_srcs $ add_library(srsran_phy STATIC ${srsran_srcs} ) target_link_libraries(srsran_phy pthread m ${FFT_LIBRARIES}) -INSTALL(TARGETS srsran_phy DESTINATION ${LIBRARY_DIR}) +install(TARGETS srsran_phy DESTINATION ${LIBRARY_DIR} OPTIONAL) diff --git a/lib/src/phy/rf/CMakeLists.txt b/lib/src/phy/rf/CMakeLists.txt index d29d464f3..5faf68f5e 100644 --- a/lib/src/phy/rf/CMakeLists.txt +++ b/lib/src/phy/rf/CMakeLists.txt @@ -36,7 +36,7 @@ if(RF_FOUND) list(APPEND STATIC_PLUGINS srsran_rf_uhd) endif (ENABLE_RF_PLUGINS) target_link_libraries(srsran_rf_uhd srsran_rf_utils srsran_phy ${UHD_LIBRARIES} ${Boost_LIBRARIES}) - install(TARGETS srsran_rf_uhd DESTINATION ${LIBRARY_DIR}) + install(TARGETS srsran_rf_uhd DESTINATION ${LIBRARY_DIR} OPTIONAL) # If found, add a macro to inform the UHD driver about the available feature if (UHD_ENABLE_X300_FW_RESET) @@ -62,7 +62,7 @@ if(RF_FOUND) list(APPEND STATIC_PLUGINS srsran_rf_blade) endif (ENABLE_RF_PLUGINS) target_link_libraries(srsran_rf_blade srsran_rf_utils srsran_phy ${BLADERF_LIBRARIES}) - install(TARGETS srsran_rf_blade DESTINATION ${LIBRARY_DIR}) + install(TARGETS srsran_rf_blade DESTINATION ${LIBRARY_DIR} OPTIONAL) endif (BLADERF_FOUND AND ENABLE_BLADERF) if (SOAPYSDR_FOUND AND ENABLE_SOAPYSDR) @@ -77,7 +77,7 @@ if(RF_FOUND) list(APPEND STATIC_PLUGINS srsran_rf_soapy) endif (ENABLE_RF_PLUGINS) target_link_libraries(srsran_rf_soapy srsran_rf_utils srsran_phy ${SOAPYSDR_LIBRARIES}) - install(TARGETS srsran_rf_soapy DESTINATION ${LIBRARY_DIR}) + install(TARGETS srsran_rf_soapy DESTINATION ${LIBRARY_DIR} OPTIONAL) endif (SOAPYSDR_FOUND AND ENABLE_SOAPYSDR) if(SKIQ_FOUND AND ENABLE_SKIQ) @@ -94,7 +94,7 @@ if(RF_FOUND) list(APPEND STATIC_PLUGINS srsran_rf_skiq) endif (ENABLE_RF_PLUGINS) target_link_libraries(srsran_rf_skiq srsran_rf_utils srsran_phy ${SKIQ_LIBRARIES} rt) - install(TARGETS srsran_rf_skiq DESTINATION ${LIBRARY_DIR}) + install(TARGETS srsran_rf_skiq DESTINATION ${LIBRARY_DIR} OPTIONAL) endif(SKIQ_FOUND AND ENABLE_SKIQ) if (ZEROMQ_FOUND AND ENABLE_ZEROMQ) @@ -109,7 +109,7 @@ if(RF_FOUND) list(APPEND STATIC_PLUGINS srsran_rf_zmq) endif (ENABLE_RF_PLUGINS) target_link_libraries(srsran_rf_zmq srsran_rf_utils srsran_phy ${ZEROMQ_LIBRARIES}) - install(TARGETS srsran_rf_zmq DESTINATION ${LIBRARY_DIR}) + install(TARGETS srsran_rf_zmq DESTINATION ${LIBRARY_DIR} OPTIONAL) endif (ZEROMQ_FOUND AND ENABLE_ZEROMQ) # Add sources of file-based RF directly to the RF library (not as a plugin) @@ -148,7 +148,7 @@ if(RF_FOUND) foreach (TOP_RF_LIB ${TOP_RF_LIBS}) target_link_libraries(${TOP_RF_LIB} srsran_rf_utils srsran_phy) set_target_properties(${TOP_RF_LIB} PROPERTIES VERSION ${SRSRAN_VERSION_STRING} SOVERSION ${SRSRAN_SOVERSION}) - install(TARGETS ${TOP_RF_LIB} DESTINATION ${LIBRARY_DIR}) + install(TARGETS ${TOP_RF_LIB} DESTINATION ${LIBRARY_DIR} OPTIONAL) endforeach () # Tests diff --git a/lib/src/radio/CMakeLists.txt b/lib/src/radio/CMakeLists.txt index 515e0a9cf..eb5a08080 100644 --- a/lib/src/radio/CMakeLists.txt +++ b/lib/src/radio/CMakeLists.txt @@ -9,7 +9,7 @@ if(RF_FOUND) add_library(srsran_radio STATIC radio.cc channel_mapping.cc) target_link_libraries(srsran_radio srsran_rf srsran_common) - INSTALL(TARGETS srsran_radio DESTINATION ${LIBRARY_DIR}) + install(TARGETS srsran_radio DESTINATION ${LIBRARY_DIR} OPTIONAL) endif(RF_FOUND) add_subdirectory(test) diff --git a/lib/src/rlc/CMakeLists.txt b/lib/src/rlc/CMakeLists.txt index 89b44fba6..23e2debdc 100644 --- a/lib/src/rlc/CMakeLists.txt +++ b/lib/src/rlc/CMakeLists.txt @@ -20,4 +20,4 @@ set(SOURCES rlc.cc add_library(srsran_rlc STATIC ${SOURCES}) target_link_libraries(srsran_rlc srsran_common ${ATOMIC_LIBS}) -INSTALL(TARGETS srsran_rlc DESTINATION ${LIBRARY_DIR}) +install(TARGETS srsran_rlc DESTINATION ${LIBRARY_DIR} OPTIONAL) diff --git a/lib/src/srslog/CMakeLists.txt b/lib/src/srslog/CMakeLists.txt index 794285555..4995bf8b9 100644 --- a/lib/src/srslog/CMakeLists.txt +++ b/lib/src/srslog/CMakeLists.txt @@ -30,4 +30,4 @@ find_package(Threads REQUIRED) add_library(srslog STATIC ${SOURCES}) target_link_libraries(srslog ${CMAKE_THREAD_LIBS_INIT}) -INSTALL(TARGETS srslog DESTINATION ${LIBRARY_DIR}) +install(TARGETS srslog DESTINATION ${LIBRARY_DIR} OPTIONAL) diff --git a/srsenb/src/CMakeLists.txt b/srsenb/src/CMakeLists.txt index 2db4196cb..8c92d1b67 100644 --- a/srsenb/src/CMakeLists.txt +++ b/srsenb/src/CMakeLists.txt @@ -54,4 +54,4 @@ else(NOT ${BUILDENB_CMD} STREQUAL "") message(STATUS "No post-build-ENB command defined") endif (NOT ${BUILDENB_CMD} STREQUAL "") -install(TARGETS srsenb DESTINATION ${RUNTIME_DIR}) +install(TARGETS srsenb DESTINATION ${RUNTIME_DIR} OPTIONAL) diff --git a/srsepc/src/CMakeLists.txt b/srsepc/src/CMakeLists.txt index b88e0517c..46c84ac3b 100644 --- a/srsepc/src/CMakeLists.txt +++ b/srsepc/src/CMakeLists.txt @@ -64,5 +64,5 @@ else(NOT ${BUILDEPC_CMD} STREQUAL "") message(STATUS "No post-build-EPC command defined") endif (NOT ${BUILDEPC_CMD} STREQUAL "") -install(TARGETS srsepc DESTINATION ${RUNTIME_DIR}) -install(TARGETS srsmbms DESTINATION ${RUNTIME_DIR}) +install(TARGETS srsepc DESTINATION ${RUNTIME_DIR} OPTIONAL) +install(TARGETS srsmbms DESTINATION ${RUNTIME_DIR} OPTIONAL) diff --git a/srsue/src/CMakeLists.txt b/srsue/src/CMakeLists.txt index 8b4043623..c98d9aae7 100644 --- a/srsue/src/CMakeLists.txt +++ b/srsue/src/CMakeLists.txt @@ -64,4 +64,4 @@ else(NOT ${BUILDUE_CMD} STREQUAL "") message(STATUS "No post-build-UE command defined") endif (NOT ${BUILDUE_CMD} STREQUAL "") -install(TARGETS srsue DESTINATION ${RUNTIME_DIR}) +install(TARGETS srsue DESTINATION ${RUNTIME_DIR} OPTIONAL)