# In this CMakeLists.txt we define which files
# are used to compile the application
set(master_SRCS
   master.cpp
   cpdo.cpp
   csdo.cpp
   clss.cpp
   cnmt.cpp
   cremove.cpp
   cwrite.cpp
   cread.cpp
   cinstall.cpp
   cothread.cpp
   main.cpp
 )

# Run ui files through uic
kde4_add_ui_files(master_SRCS master.ui)
kde4_add_ui_files(master_SRCS lss.ui)
kde4_add_ui_files(master_SRCS nmt.ui)
kde4_add_ui_files(master_SRCS pdo.ui)
kde4_add_ui_files(master_SRCS sdo.ui)
kde4_add_ui_files(master_SRCS remove_pdo.ui)
kde4_add_ui_files(master_SRCS install_pdo.ui)
kde4_add_ui_files(master_SRCS read_pdo.ui)
kde4_add_ui_files(master_SRCS write_pdo.ui)

# Set the name of the application
kde4_add_executable(master ${master_SRCS})

# Select which libraries we need to link to
target_link_libraries(master ${KDE4_KDEUI_LIBS} libLeanCANopen.so libSoftingCan.so )

# Tell cmake to install the application binary
install(TARGETS master ${INSTALL_TARGETS_DEFAULT_ARGS})

# Install the .desktop file
install( PROGRAMS master.desktop  DESTINATION ${XDG_APPS_INSTALL_DIR} )

include_directories(../../../../include ../../../LeanCANopen)
