-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base pkg-config libdir on CMAKE_INSTALL_LIBDIR
Fixes #3535 Signed-off-by: Henner Zeller <[email protected]>
- Loading branch information
Showing
4 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
# Simple example how to utilize pkg-config to find the cflags and libraries | ||
CXXFLAGS=--std=c++17 | ||
CXXFLAGS+=`pkg-config --cflags Surelog` | ||
LDFLAGS+=`pkg-config --libs Surelog` | ||
|
||
# TODO(hzeller): should the supporting libs be mentioned in the pkg-config ? | ||
LDFLAGS+=-lpthread | ||
|
||
# Let's build these out-of-tree | ||
IN_DIR=src | ||
OUT_DIR=build | ||
OUT_DIR=tests/TestInstall/build | ||
|
||
$(OUT_DIR)/%.o : $(IN_DIR)/%.cpp | ||
$(CXX) $(CXXFLAGS) -c $^ -o $@ | ||
$(OUT_DIR)/%.o : $(IN_DIR)/%.cpp $(OUT_DIR) | ||
$(CXX) $(CXXFLAGS) -c $< -o $@ | ||
|
||
% : %.o | ||
$(CXX) $^ -o $@ $(LDFLAGS) | ||
|
||
$(OUT_DIR): | ||
mkdir -p $(OUT_DIR) |