if (DEFINED IRIS_IPP_LIB)
  link_directories(${IRIS_IPP_LIB})
endif (DEFINED IRIS_IPP_LIB)

if (DEFINED BASE_SOURCE_DIR)
  include_directories(
    ${BASE_SOURCE_DIR}/include
    ${BASE_SOURCE_DIR}/user_lib
    ${BASE_SOURCE_DIR}/config_lib)
endif (DEFINED BASE_SOURCE_DIR)

set(PACKAGE rda-softplane)

enable_nls()

include_directories(
        ${CMAKE_CURRENT_SOURCE_DIR}/../include
        ${CMAKE_CURRENT_SOURCE_DIR}/../netcards_lib
        ${CMAKE_CURRENT_SOURCE_DIR}/../rdasubs_lib
        ${CMAKE_CURRENT_SOURCE_DIR}/../pcicards)

set(SOURCE_FILES
        softplane_lib.h
        softplane_def.h
        rda_limits.c
        softplane_lib_nls_init.c
        spl_config.c
        spl_config_net.c
        spl_config_pci.c
        spl_data.c
        spl_data_net.c
        spl_data_pci.c)

add_library(softplane SHARED ${SOURCE_FILES})
add_executable(softplane-bin softplane.c)

target_link_libraries(softplane-bin softplane pcicards netcards rdasubs
        dsp antenna exthdr z dl tirpc ipps
        config user himath pthread rt m)

# now we rename softplane-bin executable to softplane using target properties
set_target_properties(softplane-bin
        PROPERTIES OUTPUT_NAME softplane)

