Comments (3)
Almost done with this one actually, it was easier than i expected.
from issue_tracker.
So the solution i found, that is more or less painless, is: all dependencies must use CMake and be setup for tool chains, while also having a repo tree like this:
# lets say the name of the dep is "example"
# so the repo structure will look like this
example/
├── CMakeLists.txt
├── LICENSE
├── README.md
├── src
│ ├── example.h
│ └── # and other src files
└── test
├── CMakeLists.txt
└── # test src files
The main dep build recipe should not set up any global variables or declarations, only target specific commands.
It needs to have tests, but they need to be off by default (i'm not building dep tests in production, just no, our driver takes ages to compile as is).
The main include header for the dep needs to be located (and named) in <dep_repo_root>/src/<dep_name>.h
and the dep needs to declare only a single target named <dep_name>
.
All of that to achieve this behavior when using the dep.
CMakeLists.txt
in the main project:
...
# setup toolchain
add_subdirectory("<dep_name>")
set(<dep_name>_INCLUDE_DIR "<dep_repo_root>/src/")
...
# add dep to include path
target_include_directories(main_target
...
${<dep_name>_INCLUDE_DIR}
...
)
...
# link dep target
target_link_libraries(main_target
<dep_name>
...
${CMAKE_DL_LIBS}
)
...
from issue_tracker.
It'll take some time to move all of our deps to this mental model (cough cough openvr cough cough), but it's worth it and most of our deps are already pretty much setup for this, requiring only a few tweaks (like disabling test builds or changing some compile options).
from issue_tracker.
Related Issues (20)
- [FEATURE REQ]: The ability to emulate a Wii controller using a VR controller
- Fix typos in docs HOT 1
- [BUG]: Fix device status issues HOT 4
- [FEATURE REQ]: Add support for device plugins
- [FEATURE REQ]: Finally add support for update checks
- Poser implementations HOT 4
- [Feature request] WII BALANCE BOARD for VR LOCOMOTION HOT 4
- [BUG]: Fix receiver buffer realloc issue HOT 4
- [FEATURE REQ]: Make gaze master icons HOT 4
- [FEATURE REQ]: Set an expiration for CI artifacts
- [LICENSE]: We need to update our copyright headers
- Free hosting yes
- Ukrainian Support Charity Page
- [FEATURE REQ]: gaze master app plugins HOT 8
- [BUG]: Fix installers HOT 1
- Test gaze master inputs HOT 4
- [BUG]: lazy-sockets receiver shutdown behaviour
- [BUG]: Cmake boost builds borked on Windows
- [BUGS]: Fix all driver UB
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from issue_tracker.