Skip to content

Commit

Permalink
fix lib prefix for module path. (#14)
Browse files Browse the repository at this point in the history
* Properly handle lib prefix.

* Removed unnecessary message.
  • Loading branch information
JonathanHenson authored Jan 5, 2019
1 parent 0753e90 commit ad9a8b2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

This comment has been minimized.

Copy link
@krop

krop Apr 3, 2019

The default is already lib is the variable is unset

endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake")

This comment has been minimized.

Copy link
@krop

krop Apr 3, 2019

You can't tell whether CMAKE_INSTALL_LIBDIR is relative or absolute (the %cmake macro we have in openSUSE uses absolute paths)
replace ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} with ${CMAKE_INSTALL_FULL_LIBDIR}

As mentioned on IRC, this shouldn't be needed however.

This comment has been minimized.

Copy link
@glaubitz

glaubitz Apr 3, 2019

Thanks. Unfortunately, CMAKE_INSTALL_FULL_LIBDIR/cmake doesn't work either.

This comment has been minimized.

Copy link
@glaubitz

glaubitz Apr 3, 2019

Hmm, this seems to be a bug in cmake: https://gitlab.kitware.com/cmake/cmake/issues/17340


include(AwsCFlags)
include(AwsSharedLibSetup)
include(AwsSanitizers)
Expand Down

1 comment on commit ad9a8b2

@glaubitz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that this still does not address the issue of 32-bit vs. 64-bit library paths, see: #15

Please sign in to comment.