Skip to content

Commit 107ac82

Browse files
author
Alex Damian
authored
Merge pull request #85 from accelerated/201_hotfix
Fixes for pkgconfig file generation
2 parents 2db8e21 + bd6da44 commit 107ac82

File tree

7 files changed

+16
-8
lines changed

7 files changed

+16
-8
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ set(QUANTUM_VERSION "${QUANTUM_VERSION_MAJOR}.${QUANTUM_VERSION_MINOR}.${QUANTUM
2424
if (QUANTUM_INSTALL_ROOT)
2525
set(CMAKE_INSTALL_PREFIX ${QUANTUM_INSTALL_ROOT})
2626
endif()
27+
if (NOT QUANTUM_PKGCONFIG_DIR)
28+
set(QUANTUM_PKGCONFIG_DIR share/pkgconfig)
29+
endif()
2730

2831
#Global options
2932
set(MODE 64)
@@ -141,6 +144,7 @@ endif()
141144
if (QUANTUM_VERBOSE_MAKEFILE)
142145
message(STATUS "PROJECT_SOURCE_DIR = ${PROJECT_SOURCE_DIR}/")
143146
message(STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
147+
message(STATUS "QUANTUM_PKGCONFIG_DIR = ${QUANTUM_PKGCONFIG_DIR}")
144148
message(STATUS "BOOST_ROOT = ${BOOST_ROOT}")
145149
message(STATUS "REQUIRED BOOST_VERSION = 1.61")
146150
message(STATUS "GTEST_ROOT = ${GTEST_ROOT}")

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ Various **CMake** options can be used to configure the output:
115115
* `QUANTUM_BOOST_USE_FIXEDSIZE_STACKS` : Use Boost fixed size stacks for coroutines. Default `OFF`.
116116
* `QUANTUM_INSTALL_ROOT` : Specify custom install path.
117117
Default is `/usr/local/include` for Linux or `c:/Program Files` for Windows.
118+
* `QUANTUM_PKGCONFIG_DIR` : Specify custom install path for .pc file. Default is `${QUANTUM_INSTALL_ROOT}/share/pkgconfig`.
119+
To specify a relative path from `QUANTUM_INSTALL_ROOT`, omit leading `/`.
118120
* `BOOST_ROOT` : Specify a different Boost install directory.
119121
* `GTEST_ROOT` : Specify a different GTest install directory.
120122

quantum.pc.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ Name: quantum
88
Url: https://github.com/bloomberg/quantum
99
Description: C++ coroutine library using Boost.Coroutine2
1010
Version: @QUANTUM_VERSION@
11-
Requires: boost_context >= 1.61
11+
Requires.private: boost_context >= 1.61
1212
Libs: -L${libdir} -L${sharedlibdir} -L@Boost_LIBRARY_DIRS@ -lboost_context -lpthread
13-
Cflags: -I${includedir} -I@BOOST_ROOT@
13+
Cflags: -I${includedir} -I@Boost_INCLUDE_DIRS@

quantum/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ install(
5656
COMPONENT headers
5757
)
5858
install(
59-
FILES PKG_CONFIG
60-
DESTINATION share/pkgconfig
59+
FILES ${PKG_CONFIG}
60+
DESTINATION ${QUANTUM_PKGCONFIG_DIR}
6161
COMPONENT pkgconfig
6262
)

quantum/interface/quantum_icoro_context.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,8 @@ using CoroContext = ICoroContext<RET>;
513513

514514
template <class RET>
515515
using CoroContextPtr = typename ICoroContext<RET>::Ptr;
516-
using VoidContextPtr = CoroContextPtr<Void>;
516+
using VoidCoroContextPtr = CoroContextPtr<Void>;
517+
using VoidContextPtr = VoidCoroContextPtr; //shorthand version
517518

518519
}}
519520

quantum/quantum_functions.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ namespace quantum {
2626
struct Void{};
2727
template <typename T>
2828
struct ICoroContext;
29-
using VoidContextPtr = std::shared_ptr<ICoroContext<Void>>;
29+
using VoidCoroContextPtr = std::shared_ptr<ICoroContext<Void>>;
30+
using VoidContextPtr = VoidCoroContextPtr; //shorthand version
3031

3132
//==============================================================================================
3233
// struct Functions

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ file(GLOB SOURCE_FILES *.cpp)
44
include_directories(AFTER
55
${PROJECT_SOURCE_DIR}
66
${CMAKE_CURRENT_SOURCE_DIR}
7-
${BOOST_ROOT}
7+
${Boost_INCLUDE_DIRS}
88
${GTEST_ROOT}
99
)
1010
link_directories(
11-
${BOOST_ROOT}
11+
${Boost_LIBRARY_DIRS}
1212
${GTEST_ROOT}
1313
)
1414
add_executable(${TEST_TARGET} ${SOURCE_FILES})

0 commit comments

Comments
 (0)