Skip to content

Commit

Permalink
Crypto++: fix lib location on some GNU/Linux systems
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Jan 9, 2017
1 parent 658f2d0 commit f0289e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cryptopp.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include(ExternalProject)
include(GNUInstallDirs)

# Support Emscripten builds by overwritting CMAKE_COMMAND.
if (${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
Expand Down Expand Up @@ -36,9 +37,9 @@ ExternalProject_Add(cryptopp-project
ExternalProject_Get_Property(cryptopp-project INSTALL_DIR)
add_library(cryptopp STATIC IMPORTED)
if (MSVC)
set(CRYPTOPP_LIBRARY ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}cryptopp-static${CMAKE_STATIC_LIBRARY_SUFFIX})
set(CRYPTOPP_LIBRARY ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}cryptopp-static${CMAKE_STATIC_LIBRARY_SUFFIX})
else()
set(CRYPTOPP_LIBRARY ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}cryptopp${CMAKE_STATIC_LIBRARY_SUFFIX})
set(CRYPTOPP_LIBRARY ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}cryptopp${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()
set(CRYPTOPP_INCLUDE_DIR ${INSTALL_DIR}/include)
file(MAKE_DIRECTORY ${CRYPTOPP_INCLUDE_DIR}) # Must exist.
Expand Down

0 comments on commit f0289e2

Please sign in to comment.