project(complexdvd)

SET(complexdvd_SOURCES
   #assignmenuaudio.cpp
   complexdvd.cpp
   configwidget.cpp
   run.cpp
   #${CMAKE_SOURCE_DIR}/qdvdauthor/plugins/complexdvd/uicomplexdvd.cpp
   #${CMAKE_SOURCE_DIR}/qdvdauthor/plugins/complexdvd/run.cpp
)

SET(complexdvd_HEADERS
   #assignmenuaudio.h
   complexdvd.h
   configwidget.h
   run.h
   #${CMAKE_SOURCE_DIR}/qdvdauthor/plugins/complexdvd/uicomplexdvd.h
   #${CMAKE_SOURCE_DIR}/qdvdauthor/plugins/complexdvd/run.h
)

SET(complexdvd_FORMS
   #uiassignmenuaudio.ui
   uicomplexdvd.ui
   #${CMAKE_SOURCE_DIR}/qdvdauthor/plugins/complexdvd/uicomplexdvd.ui
   #${PROJECT_SOURCE_DIR}/uicomplexdvd.ui
)
 
QT5_WRAP_CPP(complexdvd_HEADERS_MOC ${complexdvd_HEADERS})
QT5_WRAP_UI(complexdvd_FORMS_HEADERS ${complexdvd_FORMS})
#QT5_ADD_RESOURCES(complexdvd_RESOURCES_RCC ${complexdvd_RESOURCES} ${complexdvd_RESOURCES_})

#ADD_EXECUTABLE(complexdvd ${complexdvd_SOURCES} 
#    ${complexdvd_HEADERS_MOC} 
#    ${complexdvd_FORMS_HEADERS}
#    ${complexdvd_RESOURCES_RCC}
#    ) 

SET(PROJECT_VERSION 2.0.0)

#set_property(SOURCE interface.h APPEND PROPERTY COMPILE_DEFINITIONS PLUGIN_VERSION="${PROJECT_VERSION}")

#add_library(complexdvd SHARED complexdvd.cpp)
add_library(complexdvd SHARED
   ${complexdvd_SOURCES}
   #${complexdvd_HEADERS_MOC}
   ${complexdvd_FORMS_HEADERS}
)
set_target_properties(complexdvd PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties(complexdvd PROPERTIES SOVERSION 2)
    
#TARGET_LINK_LIBRARIES(complexdvd Qt5::Widgets Qt5::Xml xine X11 Qt5::Network Qt5::PrintSupport dl)
#TARGET_LINK_LIBRARIES(complexdvd complexdvd)

message(STATUS "Found complexdvd:")

########### install files ###############

#INSTALL( TARGETS complexdvd DESTINATION bin)
INSTALL(TARGETS complexdvd           DESTINATION  share/qdvdauthor/plugins/        PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
INSTALL(FILES background.jpg         DESTINATION  share/qdvdauthor/plugins/complexdvd/)
INSTALL(FILES main.png               DESTINATION  share/qdvdauthor/plugins/complexdvd/)
INSTALL(FILES next.png               DESTINATION  share/qdvdauthor/plugins/complexdvd/)
INSTALL(FILES prev.png               DESTINATION  share/qdvdauthor/plugins/complexdvd/)
#INSTALL(FILES libcomplexdvd.so       DESTINATION  share/qdvdauthor/plugins/)
#INSTALL(FILES libcomplexdvd.so.2     DESTINATION  share/qdvdauthor/plugins/)
#INSTALL(FILES libcomplexdvd.so.2.0.0 DESTINATION  share/qdvdauthor/plugins/)

