A cross-platform base for native Nickvision applications.
libnick provides Nickvision apps with a common set of cross-platform APIs for managing system and desktop app functionality such as network management, taskbar icons, translations, app updates, and more.
Documentation for this library and its modules can be found here.
The following are a list of dependencies used by libnick.
- boost-json
- gtest
- libcurl
- libintl
- maddy
The above dependencies must be installed, plus the following for Windows systems:
- sqlcipher
The above dependencies must be installed, plus the following for Linux systems:
- glib
- libsecret
- openssl
- Used for sqlcipher, as libnick manually builds sqlcipher on Linux as the vcpkg port is broken.
The above dependencies must be installed, plus the following for macOS systems:
- glib
- libsecret
- openssl
- Used for sqlcipher, as libnick manually builds sqlcipher on macOS as the vcpkg port is broken.
libnick is available through vcpkg
.
Simply install and configure vcpkg for your system, and run:
vcpkg install libnick
You can then use libnick from cmake with the following:
find_package(libnick CONFIG REQUIRED)
target_link_libraries(main PRIVATE libnick::libnick)
libnick uses vcpkg
to manage its dependencies and cmake
as its build system.
Ensure both vcpkg
and cmake
are installed on your system before building and installing libnick.
A C++20 compiler is also required to build libnick.
- Set the
VCPKG_ROOT
environment variable to the path of your vcpkg installation's root directory.
- Set the
VCPKG_DEFAULT_TRIPLET
environment variable tox64-windows
- Run
vcpkg install boost-json curl gettext-libintl gtest maddy sqlcipher
- Set the
VCPKG_DEFAULT_TRIPLET
environment variable tox64-linux
- Run
vcpkg install boost-json curl gettext-libintl glib gtest libsecret maddy openssl
- Set the
VCPKG_DEFAULT_TRIPLET
environment variable tox64-osx
- Run
vcpkg install boost-json curl gettext-libintl glib gtest libsecret maddy openssl
- Set the
VCPKG_DEFAULT_TRIPLET
environment variable toarm64-osx
- Run
vcpkg install boost-json curl gettext-libintl glib gtest libsecret maddy openssl
- First, clone/download the repo.
- Open a terminal and navigate to the repo's root directory.
- Create a new
build
directory andcd
into it.
- From the
build
folder, runcmake .. -G "Visual Studio 17 2022"
.- To skip building libnick's test suite, add
-DBUILD_TESTING="OFF"
to the end of the command. - If you plan to install libnick, add
-DCMAKE_INSTALL_PREFIX=PATH_TO_INSTALL_DIR
to the end of the command, replacingPATH_TO_INSTALL_DIR
with the path of where you'd like libnick to install to.
- To skip building libnick's test suite, add
- From the
build
folder, runcmake --build . --config Release
. - After these commands complete, libnick will be successfully built and its binaries can be found in the
Release
folder of thebuild
folder.
- From the
build
folder, runcmake .. -DCMAKE_BUILD_TYPE=Release
.- To skip building libnick's test suite, add
-DBUILD_TESTING="OFF"
to the end of the command. - If you plan to install libnick, add
-DCMAKE_INSTALL_PREFIX=PATH_TO_INSTALL_DIR
to the end of the command, replacingPATH_TO_INSTALL_DIR
with the path of where you'd like libnick to install to.
- To skip building libnick's test suite, add
- From the
build
folder, runcmake --build .
. - After these commands complete, libnick will be successfully built and its binaries can be found in the
build
folder.
- From the
build
folder, runcmake .. -DCMAKE_BUILD_TYPE=Release
.- To skip building libnick's test suite, add
-DBUILD_TESTING="OFF"
to the end of the command. - If you plan to install libnick, add
-DCMAKE_INSTALL_PREFIX=PATH_TO_INSTALL_DIR
to the end of the command, replacingPATH_TO_INSTALL_DIR
with the path of where you'd like libnick to install to.
- To skip building libnick's test suite, add
- From the
build
folder, runcmake --build .
. - After these commands complete, libnick will be successfully built and its binaries can be found in the
build
folder.
- To install libnick to the system, from the
build
folder, runcmake --install .
.- This command will export and install libnick cmake targets allowing you to simply use libnick in other cmake projects with the following:
find_package(libnick CONFIG REQUIRED) target_link_libraries(main PRIVATE libnick::libnick)
- This command will export and install libnick cmake targets allowing you to simply use libnick in other cmake projects with the following: