-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR fixes PackageConfig and create the corresponding test Related PR: #1109
- Loading branch information
Showing
6 changed files
with
127 additions
and
77 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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cmake_minimum_required(VERSION 3.9) | ||
project(GinkgoExportBuildWithPkgConfigTest LANGUAGES CXX) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(GINKGO REQUIRED IMPORTED_TARGET ginkgo) | ||
|
||
|
||
# Here, we use test install without any data. We instantiate the | ||
# interface only. | ||
add_executable(test_pkgconfig ../test_install/test_install.cpp) | ||
target_compile_features(test_pkgconfig PUBLIC cxx_std_14) | ||
# CMake PkgConfig only puts the -l, -L, and -framework into link_libraries and others into link_options | ||
# When linking the target, the linking option will be before the compiled object to lead the linking error | ||
set_property(TARGET PkgConfig::GINKGO PROPERTY INTERFACE_LINK_LIBRARIES "${GINKGO_LDFLAGS}") | ||
set_property(TARGET PkgConfig::GINKGO PROPERTY INTERFACE_LINK_OPTIONS "") | ||
target_link_libraries(test_pkgconfig PRIVATE PkgConfig::GINKGO) |