A CLI tool to produce a project local vcpkg installation. Create IDE agnostic and replicable C/C++ environments with ease and manage dependencies using the vcpkg toolchain.
- About
- Getting Started
- Usage
- Roadmap
- Contributing
- License
- Contact
- Acknowledgments
We are grateful for all these contributors!
Requirements for the software and other tools to build, test and push
- Python >= 3.12
- requirements.txt
Clone this repository:
https://github.com/Sekuora/TrezEnv.gitOpen the project with your IDE of preference and run:
pip install -r requirements.txtBuild executable -> in project root run this.
nuitka --standalone --onefile trezenv.pyNow, you should have a binary file ready to use, or download the precompiled version from releases.
Build or download precompiled binaries of trezenv. <a href="" Latest release here (note: at the moment the cli has only been tested on windows) Place the program in your project location,
Create a plain "trezenv" file without extensions in a C/C++ project where you need vcpkg to be inmediatly recognized and its dependencies installed.
As of the first version 1.1.0 Trezenv' CLI consists of 3 commands
- Options
- --envpath, -ep set the path where trezenv will install dependencies. Default is "externals/vcpkg"
- Options
- --envpath, -ep, check the path where trezenv will install dependencies. Useful in case of changes
- This command will read the "trezenv" file located in your root folder, and pass its dependencies to vcpkg.
- Once installed add the toolchain directory to your CMake File
### Example CMake File Tested with trezenv
### vcpkg toolchain file ###
set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/externals/vcpkg")
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file")
###
# Package Dependencies
find_package(SDL3 CONFIG REQUIRED)
find_package(SDL3_ttf CONFIG REQUIRED)
find_package(SDL3_image CONFIG REQUIRED)
find_package(Lua REQUIRED)
find_package(glm CONFIG REQUIRED)
find_package(imgui CONFIG REQUIRED)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE SDL3::SDL3 SDL3_ttf::SDL3_ttf-shared imgui::imgui ${LUA_LIBRARIES} glm::glm-header-only)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE $<IF:$<TARGET_EXISTS:SDL3_image::SDL3_image-shared>,SDL3_image::SDL3_image-shared,SDL3_image::SDL3_image-static>)
- In this case I've tested trezenv to manage dependencies for a large game engine project. I've linked according to the expected find_package and target_link_libraries commands.
- You can review said commands by visiting the specific vcpkg library you want to find in vcpkg's webiste and the linkage commands can be found when you install the libraries.
- Install dependencies from trezenv file
- Get project dependencies ready with a single trezenv init command
- Work with vcpkg manifest mode
- Make it work globally from system environment variables
- Improve trezenv file parsing add support for triplets
- Create fully featured docs and video demo
- Add more easy to use commands for miscellaneous features
- Add and test support with various build tools
- Automatically Add vcpkg deps in CMakeLists.txt
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make the project better, please fork the repo and create a pull request. Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Licensed under Apache-2.0 License
In hopes you have found the project useful and want to support development I share the platforms where you can show your support! 💓 Any donations are greatly appreciated.