From a5e37f8fce723ea98d322ea8712ae6a9a16162e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Wed, 25 Sep 2019 10:15:43 +0800 Subject: CMakeLists.txt Still having a bug of undefined references when an app links to this library, which they say will be fixed in Qt 5.14. --- .gitignore | 5 +++++ CMakeLists.txt | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore index 7e40417..03c1779 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,8 @@ *.swp Makefile moc_* +CMakeCache.txt +CMakeFiles +CMakeLists.txt.user +cmake_install.cmake +*_autogen diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..6172f3f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.0.0) + +project(qicclient VERSION 0.1 LANGUAGES CXX) + +set(CMAKE_AUTOMOC ON) + +find_package(Qt5Core) + +add_library(${PROJECT_NAME} STATIC + client.cxx) + +target_link_libraries(${PROJECT_NAME} Qt5::Core) + +include_directories(libicclient) -- cgit v1.2.3 From 270352439b721b7b38797df1ce6f9cdf0c47c2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Thu, 26 Sep 2019 22:16:02 +0800 Subject: .pro is not used when it's CMake --- qicclient.pro | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 qicclient.pro diff --git a/qicclient.pro b/qicclient.pro deleted file mode 100644 index 7adb82e..0000000 --- a/qicclient.pro +++ /dev/null @@ -1,14 +0,0 @@ -QT -= gui -TEMPLATE = lib -CONFIG += staticlib - -HEADERS += \ - qicclient/catalog.hxx \ - qicclient/client.hxx -SOURCES += \ - catalog.cxx \ - client.cxx -INCLUDEPATH += $$PWD/libicclient -LIBS += $$PWD/libicclient/libicclient.a - -debug: DEFINES += DEBUG -- cgit v1.2.3 From 8495e87c3215b9464725ecc87d3edad25e144175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Tue, 31 Mar 2020 19:41:48 +0800 Subject: Build shared library, and prepare installation and rely on system installed libicclient. --- .gitignore | 5 ++++- CMakeLists.txt | 33 +++++++++++++++++++++++++-------- libicclient | 2 +- 3 files changed, 30 insertions(+), 10 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 index 211c5e1..e7b6017 160000 --- a/libicclient +++ b/libicclient @@ -1 +1 @@ -Subproject commit 211c5e1a57aa8958d64b16d61fcf04dc48d43837 +Subproject commit e7b6017449709bef714a272dc3e6dd93f68eb5d2 -- cgit v1.2.3 From 37c5e758bb196c2052508b60f3e90b3e87e9b268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Thu, 2 Apr 2020 18:09:20 +0800 Subject: Ignore .cmake dir and update libicclient --- .gitignore | 15 ++++++++------- libicclient | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 869288a..ce049c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,15 @@ -android-build -android_deployment_settings.json* +*.o +*.swp +*moc* +.cmake CMakeCache.txt CMakeFiles -cmake_install.cmake CMakeLists.txt.user +Makefile +android-build +android_deployment_settings.json* +cmake_install.cmake html install_manifest.txt libqicclient.a -Makefile -*moc* -*.o qicclient_autogen -*.swp diff --git a/libicclient b/libicclient index e7b6017..4443285 160000 --- a/libicclient +++ b/libicclient @@ -1 +1 @@ -Subproject commit e7b6017449709bef714a272dc3e6dd93f68eb5d2 +Subproject commit 4443285897be4058891274e12d242dde25f09760 -- cgit v1.2.3 From 4a29ec9723aef6b6d6a8e37fc49a2eb66bd095d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Sat, 6 Jun 2020 23:23:14 +0800 Subject: Simplify CMakeLists.txt much --- .gitignore | 13 +------------ CMakeLists.txt | 21 +++++++++++---------- libicclient | 2 +- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index ce049c2..bb18bf8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,4 @@ -*.o *.swp -*moc* -.cmake -CMakeCache.txt -CMakeFiles CMakeLists.txt.user -Makefile -android-build -android_deployment_settings.json* -cmake_install.cmake +build* html -install_manifest.txt -libqicclient.a -qicclient_autogen diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c34e54..bedb9ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.0) +cmake_minimum_required(VERSION 3.5) project(qicclient) @@ -6,16 +6,15 @@ set(CMAKE_AUTOMOC ON) find_package(Qt5Core) -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}) - add_library(${PROJECT_NAME} SHARED - user.moc - catalog.moc - basket.moc - client.moc + ${PROJECT_NAME}/user.hxx + ${PROJECT_NAME}/catalog.hxx + ${PROJECT_NAME}/basket.hxx + ${PROJECT_NAME}/client.hxx + user.cxx + catalog.cxx + basket.cxx + client.cxx ) target_link_libraries(${PROJECT_NAME} @@ -23,6 +22,8 @@ target_link_libraries(${PROJECT_NAME} icclient ) +target_compile_definitions(${PROJECT_NAME} PRIVATE QICCLIENT) + install(TARGETS ${PROJECT_NAME} DESTINATION lib) install(FILES ${PROJECT_NAME}/user.hxx diff --git a/libicclient b/libicclient index 4443285..a9eac75 160000 --- a/libicclient +++ b/libicclient @@ -1 +1 @@ -Subproject commit 4443285897be4058891274e12d242dde25f09760 +Subproject commit a9eac750ab758d279dc97fc4bc5075ddc6f22896 -- cgit v1.2.3