summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-03-31 19:41:48 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-03-31 19:41:48 +0800
commit8495e87c3215b9464725ecc87d3edad25e144175 (patch)
treef8e5170f13da08d74cf2e8b31cb07d51237468fe
parent4681103c794fef10a0448d4378ca68ac77b6ee29 (diff)
Build shared library, and prepare installation
and rely on system installed libicclient.
-rw-r--r--.gitignore5
-rw-r--r--CMakeLists.txt33
m---------libicclient0
3 files changed, 29 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 9a6be5c..869288a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,14 @@
+android-build
+android_deployment_settings.json*
CMakeCache.txt
CMakeFiles
cmake_install.cmake
CMakeLists.txt.user
html
+install_manifest.txt
libqicclient.a
Makefile
-moc_*
+*moc*
*.o
qicclient_autogen
*.swp
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}
+ )
diff --git a/libicclient b/libicclient
-Subproject 211c5e1a57aa8958d64b16d61fcf04dc48d4383
+Subproject e7b6017449709bef714a272dc3e6dd93f68eb5d