diff --git a/.gitmodules b/.gitmodules index 91de954..f59ffda 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "external/CatalogueAPI"] path = external/CatalogueAPI url = https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/INSTRUMENTATION/USERS/JEANDET/CatalogueAPI +[submodule "external/libcatalogs"] + path = external/libcatalogs + url = https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/SciQLOP_Repos/libcatalogs diff --git a/CMakeLists.txt b/CMakeLists.txt index a78c198..6d3dddc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,11 +48,11 @@ ENDIF(IWYU) enable_testing() -find_package(CatalogueAPI CONFIG QUIET) +find_package(catalogs CONFIG QUIET) if (NOT CatalogueAPI_FOUND) - execute_process(COMMAND git submodule init external/CatalogueAPI WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - execute_process(COMMAND git submodule update external/CatalogueAPI WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - add_subdirectory(external/CatalogueAPI) + execute_process(COMMAND git submodule init external/libcatalogs WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + execute_process(COMMAND git submodule update external/libcatalogs WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + add_subdirectory(external/libcatalogs) endif() add_subdirectory(core) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index a62cb24..df571fb 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -16,7 +16,7 @@ target_include_directories(sciqlopcore PUBLIC target_link_libraries(sciqlopcore PUBLIC Qt5::Core Qt5::Network - CatalogueAPI + catalogs ) install(TARGETS sciqlopcore EXPORT SciQLOPCoreConfig diff --git a/core/meson.build b/core/meson.build index 3bb7dfd..92d55b1 100644 --- a/core/meson.build +++ b/core/meson.build @@ -1,6 +1,6 @@ qxorm_dep = dependency('QxOrm', required : true, fallback:['QxOrm','qxorm_dep']) -catalogueapi_dep = dependency('CatalogueAPI', required : true, fallback:['CatalogueAPI','CatalogueAPI_dep']) +libcatalogs_dep = dependency('libcatalogs', required : true, fallback:['libcatalogs','libcatalogs_dep']) core_moc_headers = [ @@ -60,14 +60,14 @@ sciqlop_core_lib = library('sciqlopcore', core_moc_files, cpp_args : '-DCORE_LIB', include_directories : core_inc, - dependencies : [qt5core, qt5network, catalogueapi_dep], + dependencies : [qt5core, qt5network, libcatalogs_dep], install : true ) sciqlop_core = declare_dependency(link_with : sciqlop_core_lib, include_directories : core_inc, - dependencies : [qt5core, qt5network, catalogueapi_dep]) + dependencies : [qt5core, qt5network, libcatalogs_dep]) diff --git a/external/libcatalogs b/external/libcatalogs new file mode 160000 index 0000000..f2fa281 --- /dev/null +++ b/external/libcatalogs @@ -0,0 +1 @@ +Subproject commit f2fa281306099e7136a288dd70fd97d0e33afa15 diff --git a/gui/meson.build b/gui/meson.build index 0fc02dc..e1c2c62 100644 --- a/gui/meson.build +++ b/gui/meson.build @@ -1,5 +1,3 @@ -qxorm_dep = dependency('QxOrm', required : true, fallback:['QxOrm','qxorm_dep']) -catalogueapi_dep = dependency('CatalogueAPI', required : true, fallback:['CatalogueAPI','CatalogueAPI_dep']) gui_moc_headers = [ 'include/DataSource/DataSourceWidget.h', @@ -136,12 +134,12 @@ sciqlop_gui_lib = library('sciqlopgui', gui_moc_files, rcc_files, include_directories : [gui_inc], - dependencies : [ qt5printsupport, qt5gui, qt5widgets, qt5svg, sciqlop_core, catalogueapi_dep], + dependencies : [ qt5printsupport, qt5gui, qt5widgets, qt5svg, sciqlop_core], install : true ) sciqlop_gui = declare_dependency(link_with : sciqlop_gui_lib, include_directories : gui_inc, - dependencies : [qt5printsupport, qt5gui, qt5widgets, qt5svg, sciqlop_core, catalogueapi_dep]) + dependencies : [qt5printsupport, qt5gui, qt5widgets, qt5svg, sciqlop_core]) diff --git a/subprojects/CatalogueAPI.cmake b/subprojects/CatalogueAPI.cmake deleted file mode 100644 index c4b6ec7..0000000 --- a/subprojects/CatalogueAPI.cmake +++ /dev/null @@ -1,23 +0,0 @@ -include(ExternalProject) - -find_program(meson meson) -find_program(ninja ninja) - -SET(SOURCES_PATH ${CMAKE_SOURCE_DIR}/3rdparty/CatalogueAPI) -SET(BUILD_PATH ${CATALOGUEAPI_SOURCES_PATH}/build) -SET(CATALOGUEAPI_QXORM_LIB_PATH ${CATALOGUEAPI_BUILD_PATH}/subprojects/QxOrm) - -ExternalProject_Add( - CatalogueAPI - GIT_REPOSITORY https://perrinel@hephaistos.lpp.polytechnique.fr/rhodecode/GIT_REPOSITORIES/LPP/Users/mperrinel/CatalogueAPI - GIT_TAG develop - - SOURCE_DIR ${CMAKE_BINARY_DIR}/CatalogueAPI_src - BINARY_DIR ${CMAKE_BINARY_DIR}/CatalogueAPI_build - INSTALL_DIR ${CMAKE_BINARY_DIR}/CatalogueAPI - - CONFIGURE_COMMAND ${meson} --prefix=${CATALOGUEAPI_SOURCES_PATH} --buildtype=${CMAKE_BUILD_TYPE_TOLOWER} "${CATALOGUEAPI_SOURCES_PATH}" "${CATALOGUEAPI_BUILD_PATH}" - BUILD_COMMAND ${ninja} -C "${CATALOGUEAPI_BUILD_PATH}" - INSTALL_COMMAND ${ninja} -C "${CATALOGUEAPI_BUILD_PATH}" install - - ) diff --git a/subprojects/CatalogueAPI.wrap b/subprojects/CatalogueAPI.wrap deleted file mode 100644 index b7059bb..0000000 --- a/subprojects/CatalogueAPI.wrap +++ /dev/null @@ -1,4 +0,0 @@ -[wrap-git] -directory=CatalogueAPI -url=https://hephaistos.lpp.polytechnique.fr/rhodecode/GIT_REPOSITORIES/LPP/Users/mperrinel/CatalogueAPI.git -revision=develop diff --git a/subprojects/libcatalogs.wrap b/subprojects/libcatalogs.wrap new file mode 100644 index 0000000..b0aa06e --- /dev/null +++ b/subprojects/libcatalogs.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory=libcatalogs +url=https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/SciQLOP_Repos/libcatalogs.git +revision=master