From ad9a8b2a42d6c6ef07ccf251b5038b89487eacb3 Mon Sep 17 00:00:00 2001 From: "Jonathan M. Henson" Date: Fri, 4 Jan 2019 17:14:32 -0800 Subject: [PATCH] fix lib prefix for module path. (#14) * Properly handle lib prefix. * Removed unnecessary message. --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a84d81b..7dd5a56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,14 @@ cmake_minimum_required (VERSION 3.1) project (aws-c-event-stream C) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake") +if (UNIX AND NOT APPLE) + include(GNUInstallDirs) +elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) + set(CMAKE_INSTALL_LIBDIR "lib") +endif() + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake") + include(AwsCFlags) include(AwsSharedLibSetup) include(AwsSanitizers)