diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 14c9127..3c34e54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,34 @@ cmake_minimum_required(VERSION 3.0.0) -project(qicclient VERSION 0.1 LANGUAGES CXX) +project(qicclient) set(CMAKE_AUTOMOC ON) find_package(Qt5Core) -add_library(${PROJECT_NAME} STATIC - user.cxx - catalog.cxx - basket.cxx - client.cxx) +qt5_generate_moc(user.cxx user.moc TARGET ${PROJECT_NAME}) +qt5_generate_moc(catalog.cxx catalog.moc TARGET ${PROJECT_NAME}) +qt5_generate_moc(basket.cxx basket.moc TARGET ${PROJECT_NAME}) +qt5_generate_moc(client.cxx client.moc TARGET ${PROJECT_NAME}) -target_link_libraries(${PROJECT_NAME} Qt5::Core) +add_library(${PROJECT_NAME} SHARED + user.moc + catalog.moc + basket.moc + client.moc + ) -include_directories(libicclient) +target_link_libraries(${PROJECT_NAME} + Qt5::Core + icclient + ) + +install(TARGETS ${PROJECT_NAME} DESTINATION lib) +install(FILES + ${PROJECT_NAME}/user.hxx + ${PROJECT_NAME}/product.hxx + ${PROJECT_NAME}/catalog.hxx + ${PROJECT_NAME}/basket.hxx + ${PROJECT_NAME}/client.hxx + DESTINATION include/${PROJECT_NAME} + ) |