Comments (7)
+1
from fuzzylite.
Any suggestions on how can I create a .pc file?
from fuzzylite.
See http://people.freedesktop.org/~dbn/pkg-config-guide.html
A minimal working example could look like that:
prefix=/usr/local
exec_prefix=${prefix}
includedir=${exec_prefix}/include
libdir=${exec_prefix}/lib
Name: fuzzylite
Description: A fuzzy logic control library in C++
Version: 5.0
Libs: -L${libdir} -lfuzzylite
Cflags: -I${includedir}/fl
Typically the prefix, includedir and libdir have to be set dynamically to respect the paths chosen by the user.
You can do that with cmake, using a pre-formatted fuzzylite.pc.in file that you can configure during the cmake call to create a fuzzylite.pc file based on e.g. CMAKE_INSTALL_PREFIX, CMAKE_INSTALL_LIBDIR, etc.
from fuzzylite.
Thanks! :-)
Could you also replace ${exec_prefix}/lib
by @CMAKE_INSTALL_LIBDIR@
?
Here on Mageia (and on most RPM-based distros) the 64bit libraries are placed in /usr/lib64
from fuzzylite.
Same in Debian. Nothing is ever installed into /usr/local/
. Instead, libraries are installed into multiarch paths like in case of fuzzylite /usr/lib/x86_64-linux-gnu/libfuzzylite.so.5.0
for the shared library and /usr/include/fl/fuzzylite.h
for the development headers. Since the shared library is in a different path depending on the architecture the package is built for, this has to be made dynamic depending on @CMAKE_INSTALL_LIBDIR@
.
from fuzzylite.
Done. Thank you for your help!
from fuzzylite.
Could you also make the instllation path of fuzzylite.pc
configurable? In Debian, the libdir will have an architecture specific value, so fuzzylite.pc
differs between architectures and thus has to be installed in an architecture specifc path. The following fixes this:
--- a/fuzzylite/CMakeLists.txt
+++ b/fuzzylite/CMakeLists.txt
@@ -183,7 +183,7 @@ install(DIRECTORY fl/ DESTINATION includ
#pkg-config
configure_file(${CMAKE_SOURCE_DIR}/fuzzylite.pc.in ${CMAKE_BINARY_DIR}/fuzzylite.pc @ONLY)
-install(FILES ${CMAKE_BINARY_DIR}/fuzzylite.pc DESTINATION lib/pkgconfig)
+install(FILES ${CMAKE_BINARY_DIR}/fuzzylite.pc DESTINATION ${FL_INSTALL_LIBDIR}/pkgconfig)
message("=====================================")
message("fuzzylite v.${FL_VERSION}b${FL_DATE}\n")
Thanks!
from fuzzylite.
Related Issues (20)
- AUR - fuzzylite compilation failed HOT 6
- Run tests on Windows
- Compiling errors under Ubuntu 22.04 HOT 6
- Missunderstanding of the obstacle avoidance example HOT 2
- Outdated Doxygen URL in README.md HOT 2
- Outdated guideline hyperlink in CONTRIBUTING.md HOT 8
- Build issue with glibc 2.34 HOT 4
- support for catch2 v3
- Can not open the source file "fl/Headers.h" HOT 2
- example error undefined reference to 'fl::Engine::Engine(std::string const&)' and relocation error HOT 1
- test hardcodes path
- doxygen files in git
- fuzzylite stores build path in output binary HOT 5
- executable file without shebang
- unit test fails on i386 HOT 4
- Energia code for fuzzy speed controller on C language
- Releasing this under vcpkg HOT 3
- Segmentation fault when `fl::*` objects embedded in C++ class HOT 2
- Tests fail to compile with glibc >= 2.34 HOT 9
- TODO: Version 7.0 HOT 1
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 fuzzylite.