mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
🎉 Added QtKeychain conan pkg
This commit is contained in:
parent
95b6879661
commit
2c8e0d1ec0
29
conan-pkgs/QtKeychain/conanfile.py
Normal file
29
conan-pkgs/QtKeychain/conanfile.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
from conans import ConanFile, CMake, tools
|
||||||
|
|
||||||
|
|
||||||
|
class LibCommuniConan(ConanFile):
|
||||||
|
name = "QtKeychain"
|
||||||
|
version = "0.12.90"
|
||||||
|
license = "MIT"
|
||||||
|
author = "Edgar Edgar@AnotherFoxGuy.com"
|
||||||
|
url = "https://github.com/Chatterino/chatterino2"
|
||||||
|
description = "QtKeychain is a Qt API to store passwords and other secret data securely"
|
||||||
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
generators = "cmake"
|
||||||
|
|
||||||
|
def source(self):
|
||||||
|
git = tools.Git()
|
||||||
|
git.clone("https://github.com/Chatterino/qtkeychain.git")
|
||||||
|
git.checkout("308ea7e709113dc277be1653fe2044bb20236836")
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.configure()
|
||||||
|
cmake.build()
|
||||||
|
|
||||||
|
def package(self):
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.install()
|
||||||
|
|
||||||
|
def package_info(self):
|
||||||
|
self.cpp_info.libs = tools.collect_libs(self)
|
|
@ -15,7 +15,6 @@ project(chatterino2-dependencies VERSION 1)
|
||||||
|
|
||||||
# Options with same default value on all platforms
|
# Options with same default value on all platforms
|
||||||
option(BUILD_HUMANIZE "Build Humanize IRC framework" ON)
|
option(BUILD_HUMANIZE "Build Humanize IRC framework" ON)
|
||||||
option(BUILD_LIBCOMMUNI "Build LibCommuni IRC framework" OFF)
|
|
||||||
option(BUILD_QTKEYCHAIN "Build QtKeychain" ON)
|
option(BUILD_QTKEYCHAIN "Build QtKeychain" ON)
|
||||||
option(BUILD_RAPIDJSON "Build RapidJSON library" ON)
|
option(BUILD_RAPIDJSON "Build RapidJSON library" ON)
|
||||||
option(BUILD_SERIALIZE "Build Serialize library" ON)
|
option(BUILD_SERIALIZE "Build Serialize library" ON)
|
||||||
|
@ -84,22 +83,15 @@ endif ()
|
||||||
if (BUILD_LIBCOMMUNI)
|
if (BUILD_LIBCOMMUNI)
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
LibCommuni
|
LibCommuni
|
||||||
BUILD_IN_SOURCE 1
|
GIT_REPOSITORY https://github.com/AnotherFoxGuy/libcommuni-cmake.git
|
||||||
#DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/libcommuni ${CMAKE_BINARY_DIR}/Source/LibCommuni
|
|
||||||
#UPDATE_COMMAND ""
|
|
||||||
GIT_REPOSITORY https://github.com/communi/libcommuni.git
|
|
||||||
GIT_SHALLOW TRUE
|
GIT_SHALLOW TRUE
|
||||||
GIT_PROGRESS TRUE
|
GIT_PROGRESS TRUE
|
||||||
#PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/libcommuni-patch.pro ${CMAKE_BINARY_DIR}/Source/LibCommuni/libcommuni.pro
|
CMAKE_ARGS
|
||||||
#SOURCE_DIR "${CMAKE_SOURCE_DIR}/libcommuni"
|
-DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_OUTPUT_DIR}
|
||||||
CONFIGURE_COMMAND qmake
|
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||||
CONFIG+=$<UPPER_CASE:$<CONFIG>>
|
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||||
IRC_INSTALL_BINS=${DEPENDENCIES_OUTPUT_DIR}/bin
|
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||||
IRC_INSTALL_HEADERS=${DEPENDENCIES_OUTPUT_DIR}/include
|
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||||
IRC_INSTALL_LIBS=${DEPENDENCIES_OUTPUT_DIR}/lib
|
|
||||||
IRC_INSTALL_FEATURES=${DEPENDENCIES_OUTPUT_DIR}/features
|
|
||||||
BUILD_COMMAND $<IF:$<BOOL:WIN32>,nmake,make>
|
|
||||||
INSTALL_COMMAND $<IF:$<BOOL:WIN32>,nmake,make> install
|
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
|
@ -1,92 +0,0 @@
|
||||||
project(LibCommuni)
|
|
||||||
|
|
||||||
set(LibCommuni_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/lib/libcommuni/include/")
|
|
||||||
set(LibCommuni_SOURCE_DIR "${CMAKE_SOURCE_DIR}/lib/libcommuni/src/")
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------------------#
|
|
||||||
# Core
|
|
||||||
# ------------------------------------------------------------------------------------------------#
|
|
||||||
|
|
||||||
set(CORE_PUB_HEADERS
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/irc.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/irccommand.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircconnection.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/irccore.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircfilter.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircglobal.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircmessage.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircnetwork.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircprotocol.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(CORE_PRIV_HEADERS
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/irccommand_p.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircconnection_p.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircdebug_p.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircmessage_p.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircmessagecomposer_p.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircmessagedecoder_p.h
|
|
||||||
${LibCommuni_INCLUDE_DIR}/IrcCore/ircnetwork_p.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(CORE_SOURCE_FILES
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/irc.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/irccommand.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/ircconnection.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/irccore.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/ircfilter.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/ircmessage.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/ircmessage_p.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/ircmessagecomposer.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/ircmessagedecoder.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/ircnetwork.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/ircprotocol.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/core/ircmessagedecoder_none.cpp
|
|
||||||
${LibCommuni_SOURCE_DIR}/3rdparty/mozilla/rdf_utils.c
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
add_library(Communi_Core ${CORE_PRIV_HEADERS} ${CORE_PUB_HEADERS} ${CORE_SOURCE_FILES})
|
|
||||||
target_link_libraries(Communi_Core PRIVATE Qt5::Core Qt5::Network)
|
|
||||||
target_include_directories(Communi_Core PUBLIC "${LibCommuni_INCLUDE_DIR}/IrcCore/")
|
|
||||||
target_compile_definitions(Communi_Core PUBLIC IRC_STATIC IRC_NAMESPACE=Communi)
|
|
||||||
set_property(TARGET Communi_Core PROPERTY AUTOMOC ON)
|
|
||||||
set_property(SOURCE ${CORE_SOURCE_FILES} PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------------------#
|
|
||||||
# Model
|
|
||||||
# ------------------------------------------------------------------------------------------------#
|
|
||||||
file(GLOB_RECURSE MODEL_SOURCE_FILES CONFIGURE_DEPENDS LIST_DIRECTORIES false
|
|
||||||
"${CMAKE_SOURCE_DIR}/lib/libcommuni/src/core/*.cpp"
|
|
||||||
"${CMAKE_SOURCE_DIR}/lib/libcommuni/include/IrcModel/*.h"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(Communi_Model ${MODEL_SOURCE_FILES})
|
|
||||||
target_include_directories(Communi_Model PUBLIC "${LibCommuni_INCLUDE_DIR}/IrcModel/")
|
|
||||||
target_compile_definitions(Communi_Model PUBLIC IRC_STATIC IRC_NAMESPACE=Communi)
|
|
||||||
#set_property(TARGET Communi_Model PROPERTY AUTOMOC ON)
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------------------#
|
|
||||||
# Util
|
|
||||||
# ------------------------------------------------------------------------------------------------#
|
|
||||||
file(GLOB_RECURSE UTIL_SOURCE_FILES CONFIGURE_DEPENDS LIST_DIRECTORIES false
|
|
||||||
"${CMAKE_SOURCE_DIR}/lib/libcommuni/src/core/*.cpp"
|
|
||||||
"${CMAKE_SOURCE_DIR}/lib/libcommuni/include/IrcUtil/*.h"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(Communi_Util ${UTIL_SOURCE_FILES})
|
|
||||||
target_include_directories(Communi_Util PUBLIC "${LibCommuni_INCLUDE_DIR}/IrcUtil/")
|
|
||||||
target_compile_definitions(Communi_Util PUBLIC IRC_STATIC IRC_NAMESPACE=Communi)
|
|
||||||
#set_property(TARGET Communi_Util PROPERTY AUTOMOC ON)
|
|
||||||
|
|
||||||
set(LibCommuni_INCLUDE_DIRS ${LibCommuni_INCLUDE_DIR}/IrcCore/ ${LibCommuni_INCLUDE_DIR}/IrcModel/ ${LibCommuni_INCLUDE_DIR}/IrcUtil/)
|
|
||||||
set(LibCommuni_LIBRARIES ${Communi_Core} ${Communi_Model} ${Communi_Util})
|
|
||||||
|
|
||||||
add_library(LibCommuni::LibCommuni INTERFACE IMPORTED)
|
|
||||||
set_target_properties(LibCommuni::LibCommuni PROPERTIES
|
|
||||||
INTERFACE_LINK_LIBRARIES "${LibCommuni_LIBRARIES}"
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${LibCommuni_INCLUDE_DIRS}"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue