# glob files to be shown in qt-creator
file(GLOB MANAGER_FILES *.manager)
file(GLOB PNG_FILES *.png)
file(GLOB INI_FILES *.ini)
add_custom_target(manager_files ALL SOURCES ${MANAGER_FILES})
add_custom_target(png_files ALL SOURCES ${PNG_FILES})
add_custom_target(ini_files ALL SOURCES ${INI_FILES})

# uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
               "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
               IMMEDIATE @ONLY)
add_custom_target(uninstall "${CMAKE_COMMAND}"
                  -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")


###########################################
# messaging-framework data and configuration files
###########################################

# Compose the pkg-config file needed to find the library using that tool
set(PREFIX "${CMAKE_INSTALL_PREFIX}") # /usr
set(LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") # /usr/lib
set(INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include") # /usr/include

configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/messaging-framework.pc.in
    ${CMAKE_CURRENT_BINARY_DIR}/messaging-framework${API_VERSION}.pc
    @ONLY)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/messaging-framework${API_VERSION}.pc
    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
