From c607151462cbd81bf87a764262b3554d3be11d00 Mon Sep 17 00:00:00 2001 From: Alexander Damian Date: Mon, 20 May 2019 09:15:51 -0400 Subject: [PATCH] Removed boost_context dependency from pkgconfig file and added BITNESS detection Signed-off-by: Alexander Damian --- CMakeLists.txt | 10 ++++++++++ quantum.pc.in | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3fae88..53478da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,16 @@ if (QUANTUM_VERBOSE_MAKEFILE) message(STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}") endif() +# Determine if this is a 32 or 64 bit build +string(FIND ${CMAKE_CXX_FLAGS} "-m64" BITNESS) + +# Properly set the output directory +if (${BITNESS} EQUAL -1) + set(LIBDIR "lib") +else() + set(LIBDIR "lib64") +endif() + add_definitions( -D_REENTRANT -D_THREAD_SAFE diff --git a/quantum.pc.in b/quantum.pc.in index fbd61f6..aa9483b 100644 --- a/quantum.pc.in +++ b/quantum.pc.in @@ -1,7 +1,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} -libdir=${prefix}/lib -sharedlibdir=${prefix}/lib +libdir=${prefix}/@LIBDIR@ +sharedlibdir=${prefix}/@LIBDIR@ includedir=${prefix}/include Name: quantum @@ -9,5 +9,5 @@ Url: https://github.com/bloomberg/quantum Description: C++ coroutine library using Boost.Coroutine2 Version: @QUANTUM_VERSION@ Requires.private: boost_context >= 1.61 -Libs: -L${libdir} -L${sharedlibdir} -L@Boost_LIBRARY_DIRS@ -lboost_context -lpthread -Cflags: -I${includedir} -I@Boost_INCLUDE_DIRS@ +Libs: -L${libdir} -L${sharedlibdir} +Cflags: -I${includedir}