
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.
2025.6.5
Breaking Changes
None
New APIs
None
Fixes
- Fixed an issue where the build failed on Unix systems
Dependencies
The following are a list of dependencies used by libnick.
The recommendation and below commands will use vcpkg to pull these dependencies. However, vcpkg is not a requirement as long as the system provides these dependencies correctly.
All Platforms
- boost-json
- gtest
- libcurl
- libintl
- maddy
- sqlcipher (Must be provided by the system on Linux and macOS as sqlcipher is not available via vcpkg for these systems)
Linux and macOS
The above dependencies must be installed, plus the following for Linux and macOS systems:
- glib
- libsecret
- For macOS: Only required if -DUSE_LIBSECRET="ON"
Consuming libnick via vcpkg
libnick is available through vcpkg.
Simply install and configure vcpkg for your system, and run:
You can then use libnick from cmake with the following:
find_package(libnick CONFIG REQUIRED)
target_link_libraries(main PRIVATE libnick::libnick)
Building and Installing Manually
libnick uses cmake as its build system and vcpkg to optionally manage its dependencies.
Ensure cmake and vcpkg are installed on your system before building and installing libnick.
A C++20 compiler is also required to build libnick.
Configuring vcpkg
- Set the VCPKG_ROOT environment variable to the path of your vcpkg installation's root directory.
Windows
- Set the VCPKG_DEFAULT_TRIPLET environment variable to x64-windows
- Run vcpkg install boost-json curl gettext-libintl gtest maddy sqlcipher
Linux
- Set the VCPKG_DEFAULT_TRIPLET environment variable to x64-linux
- Run vcpkg install boost-json curl gettext-libintl glib gtest libsecret maddy
macOS (Apple Silicon)
- Set the VCPKG_DEFAULT_TRIPLET environment variable to arm64-osx
- Run vcpkg install boost-json curl gettext-libintl glib gtest libsecret maddy
Building
- First, clone/download the repo.
- Open a terminal and navigate to the repo's root directory.
- Create a new build directory and cd into it.
Windows
- From the build folder, run cmake .. -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, replacing PATH_TO_INSTALL_DIR with the path of where you'd like libnick to install to.
- From the build folder, run cmake --build . --config Release.
- After these commands complete, libnick will be successfully built and its binaries can be found in the Release folder of the build folder.
Linux
- From the build folder, run cmake .. -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, replacing PATH_TO_INSTALL_DIR with the path of where you'd like libnick to install to.
- From the build folder, run cmake --build ..
- After these commands complete, libnick will be successfully built and its binaries can be found in the build folder.
macOS
- From the build folder, run cmake .. -DCMAKE_BUILD_TYPE=Release.
- To skip building libnick's test suite, add -DBUILD_TESTING="OFF" to the end of the command.
- To use libsecret instead of macOS's built in security library, add -DUSE_LIBSECRET="ON" 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, replacing PATH_TO_INSTALL_DIR with the path of where you'd like libnick to install to.
- From the build folder, run cmake --build ..
- After these commands complete, libnick will be successfully built and its binaries can be found in the build folder.
Installing
- To install libnick to the system, from the build folder, run cmake --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)