Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
name: ${{vars.MACOS_X64_PROFILE}} tests

- uses: ./.github/actions/deploy
if: inputs.deploy
with:
builddir: build/Release
artifact: ${{vars.MACOS_X64_PROFILE}}
Expand Down
5 changes: 0 additions & 5 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def generate(self):
copy(self, "*.dylib", dep.cpp_info.libdirs[0], libdir)

tc = CMakeToolchain(self)
tc.cache_variables["CMAKE_INSTALL_LIBDIR"] = self.cpp.libdirs[0]
tc.cache_variables["SSH2_SUPPORT"] = True
tc.cache_variables["YAML_SUPPORT"] = True
tc.cache_variables["CONSOLE"] = True
Expand All @@ -134,7 +133,3 @@ def package(self):
cmake = CMake(self)
cmake.configure()
cmake.install()

def package_info(self):
self.cpp_info.libs = ["DaggyCore"]
self.cpp_info.libdirs = [self._libdir()]
43 changes: 21 additions & 22 deletions src/DaggyCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ target_sources(${TARGET}
aggregators/CConsole.hpp
)

target_link_libraries(${TARGET} PUBLIC Qt6::Core Qt6::Network)

target_link_libraries(${TARGET} PUBLIC Qt6::Core)

if (SSH2_SUPPORT)
if(CONAN_BUILD)
Expand All @@ -58,6 +57,7 @@ if (SSH2_SUPPORT)
else()
target_link_libraries(${TARGET} PUBLIC ssh2 crypto)
endif()
target_link_libraries(${TARGET} PUBLIC Qt6::Network)

target_sources(${TARGET}
PRIVATE
Expand All @@ -82,10 +82,9 @@ endif()

if(YAML_SUPPORT)
find_package(yaml-cpp REQUIRED)
target_link_libraries(${TARGET} PUBLIC yaml-cpp)
target_link_libraries(${TARGET} PUBLIC yaml-cpp::yaml-cpp)
endif()


string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
configure_file(version.h.in ${CMAKE_CURRENT_LIST_DIR}/version.h @ONLY)

Expand All @@ -109,29 +108,29 @@ endif()

if (NOT APPONLY_BUILD)
if(UNIX)
install(TARGETS ${TARGET}
EXPORT ${TARGET}Targets
PUBLIC_HEADER FILE_SET HEADERS
LIBRARY)
install(EXPORT ${TARGET}Targets
FILE ${TARGET}Targets.cmake
NAMESPACE "${PROJECT_NAME}::"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET})

include(CMakePackageConfigHelpers)
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Config.cmake
if (NOT PORTABLE_BUILD)
install(TARGETS ${TARGET}
EXPORT ${TARGET}Targets
PUBLIC_HEADER FILE_SET HEADERS
LIBRARY)
install(EXPORT ${TARGET}Targets
FILE ${TARGET}Targets.cmake
NAMESPACE "${PROJECT_NAME}::"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET})

include(CMakePackageConfigHelpers)
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Config.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET})
else()
install(TARGETS ${TARGET}
LIBRARY)
endif()
else()
install(TARGETS ${TARGET}
PUBLIC_HEADER FILE_SET HEADERS
ARCHIVE
RUNTIME)
endif()
include(package_deps)
endif()


2 changes: 1 addition & 1 deletion src/DaggyCore/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

include("${CMAKE_CURRENT_LIST_DIR}/@TARGET@Targets.cmake")

check_requred_compinents(@TARGET@)
check_required_components(@TARGET@)
include(CMakeFindDependencyMacro)
8 changes: 4 additions & 4 deletions test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.31)
project(DaggyPackageTest)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

find_package(daggy REQUIRED)
find_package(Qt6 COMPONENTS Core Network REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(DaggyCore REQUIRED)

add_subdirectory(testcpp)
add_subdirectory(testc)
26 changes: 0 additions & 26 deletions test_package/conanfile.py

This file was deleted.

2 changes: 1 addition & 1 deletion test_package/testc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)

add_executable(testc ../../src/DaggyCore/tests/interface/testc/test.c)
target_link_libraries(testc daggy::daggy)
target_link_libraries(testc daggy::DaggyCore)
4 changes: 2 additions & 2 deletions test_package/testcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(testcpp LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(testcpp ../../src/DaggyCore/tests/interface/testcpp/test.cpp)
target_link_libraries(testcpp daggy::daggy)
target_link_libraries(testcpp daggy::DaggyCore)