-
-
Notifications
You must be signed in to change notification settings - Fork 442
Install pkg-config files for libf3d and libf3d_c_api #3451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3639f0c
Install pkg-config files for libf3d and libf3d_c_api
AnikethTS 43056b3
Fix pkg-config Description/URL fields for f3d_c_api.pc
AnikethTS d76c760
Drop unrelated HOMEPAGE_URL project() change, hardcode pc URL instead
AnikethTS 8943380
Add C and C++ pkg-config examples for libf3d
AnikethTS cf8e133
Build and run pkg-config examples in generic CI on Linux
AnikethTS 4398781
Drop find, hardcode known install paths for pkg-config examples step
AnikethTS 803c819
Fix relative CMAKE_INSTALL_PREFIX in .pc files, simplify VTK linking …
AnikethTS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| prefix=@CMAKE_INSTALL_PREFIX@ | ||
| libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ | ||
| includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ | ||
|
|
||
| Name: f3d | ||
| Description: @F3D_DESCRIPTION@ | ||
| URL: https://f3d.app | ||
| Version: @F3D_VERSION@ | ||
| Libs: -L${libdir} -lf3d | ||
| Cflags: -I${includedir} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| prefix=@CMAKE_INSTALL_PREFIX@ | ||
| libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ | ||
| includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ | ||
|
|
||
| Name: f3d_c_api | ||
| Description: C bindings for @F3D_DESCRIPTION@ | ||
| URL: https://f3d.app | ||
| Version: @F3D_VERSION@ | ||
| Requires.private: f3d | ||
| Libs: -L${libdir} -lf3d_c_api | ||
| Cflags: -I${includedir} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Build against libf3d_c_api using pkg-config, without CMake. | ||
| # If VTK isn't in a standard system location, pass e.g. | ||
| # LDFLAGS="-Wl,-rpath-link,/path/to/vtk/lib" and LD_LIBRARY_PATH=/path/to/vtk/lib at runtime. | ||
|
AnikethTS marked this conversation as resolved.
Outdated
|
||
| CC ?= cc | ||
| CFLAGS += $(shell pkg-config --cflags f3d_c_api) | ||
| LDLIBS += $(shell pkg-config --libs f3d_c_api) -Wl,-rpath,$(shell pkg-config --variable=libdir f3d_c_api) | ||
|
|
||
| check-engine-pkgconfig: main.c | ||
| $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDLIBS) -o $@ | ||
|
|
||
| .PHONY: clean | ||
| clean: | ||
| rm -f check-engine-pkgconfig | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #include <f3d/engine_c_api.h> | ||
| #include <f3d/log_c_api.h> | ||
|
|
||
| int main(void) | ||
| { | ||
| f3d_engine_autoload_plugins(); | ||
|
|
||
| f3d_engine_t* engine = f3d_engine_create_none(); | ||
|
|
||
| f3d_log_info("F3D engine is loaded"); | ||
|
|
||
| f3d_engine_delete(engine); | ||
|
|
||
| return 0; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Build against libf3d using pkg-config, without CMake. | ||
| # If VTK isn't in a standard system location, pass e.g. | ||
| # LDFLAGS="-Wl,-rpath-link,/path/to/vtk/lib" and LD_LIBRARY_PATH=/path/to/vtk/lib at runtime. | ||
|
AnikethTS marked this conversation as resolved.
Outdated
|
||
| CXX ?= c++ | ||
| CXXFLAGS += -std=c++20 $(shell pkg-config --cflags f3d) | ||
| LDLIBS += $(shell pkg-config --libs f3d) -Wl,-rpath,$(shell pkg-config --variable=libdir f3d) | ||
|
|
||
| check-engine-pkgconfig: main.cxx | ||
| $(CXX) $(CXXFLAGS) $< $(LDFLAGS) $(LDLIBS) -o $@ | ||
|
|
||
| .PHONY: clean | ||
| clean: | ||
| rm -f check-engine-pkgconfig | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #include <f3d/engine.h> | ||
| #include <f3d/log.h> | ||
|
|
||
| int main() | ||
| { | ||
| f3d::engine::autoloadPlugins(); | ||
|
|
||
| f3d::engine eng = f3d::engine::createNone(); | ||
|
|
||
| f3d::log::info("F3D engine is loaded"); | ||
|
|
||
| return 0; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.