Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/location cmake config files on install #305

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.5)
project(uamqp)

FILE(READ ${CMAKE_CURRENT_LIST_DIR}/version.txt UAMQP_VERSION)
string(REPLACE "." ";" VERSION_LIST ${UAMQP_VERSION})
list(GET VERSION_LIST 0 UAMQP_VERSION_MAJOR)

option(run_e2e_tests "set run_e2e_tests to ON to run e2e tests (default is OFF) [if possible, they are always built]" OFF)
option(run_unittests "set run_unittests to ON to run unittests (default is OFF)" OFF)
Expand Down Expand Up @@ -243,6 +245,9 @@ add_library(uamqp
${uamqp_h_files}
${socketlistener_c_files}
)
set_target_properties(uamqp PROPERTIES
VERSION ${UAMQP_VERSION}
SOVERSION ${UAMQP_VERSION_MAJOR})
setTargetBuildProperties(uamqp)

target_link_libraries(uamqp aziotsharedutil)
Expand All @@ -264,7 +269,7 @@ set(UAMQP_SRC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/src CACHE INTERNAL "This is the l
include(GNUInstallDirs)

# Install uamqp
set(package_location "cmake")
set(package_location "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")

if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib")
Expand All @@ -273,7 +278,7 @@ endif()
install(TARGETS uamqp EXPORT uamqpTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/../bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot
)
install(FILES ${uamqp_h_files} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot/azure_uamqp_c)
Expand Down