Open whatnick opened 3 years ago
Not something I've ever used, don't see why it wouldn't work though. I tend to just drop the header in whatever I'm using then check it in with the rest of the source rather than keep it separate. The fast_obj CMake file is just for building the test app so won't be much use to you - don't know if that makes it more difficult.
I have CMake automatically cloning this repo. Will look at adding the path to the header in the spot the cloned stuff sits in build directory and we should be good.
I use FetchContent like so
FetchContent_Declare(
fast_obj
GIT_REPOSITORY https://github.com/thisistherk/fast_obj.git
GIT_TAG master
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(fast_obj)
# in my project
target_link_libraries(MyProject
...
PRIVATE fast_obj
...
)
I am planning to include fast_obj in another Mesh data translator library (i3s-lib)as an example of mesh-format with LoD packed as a single file via CMake ExternalProject mechanism. Placing the header in the executable source's include path via this mechanism should work.
Has this been done previously for other projects ? Are there samples around ?
Please see : https://github.com/Esri/i3s-lib/issues/6