Skip to content

Commit

Permalink
Adds version numbers to find_package CMake calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-buckley committed Jan 27, 2017
1 parent ed96057 commit 71be99a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions core/tests/gateway_e2e/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ include("../../../gatewayFunctions.cmake")
###############################################################################
###########################Find/Install/Build uamqp############################
###############################################################################
findAndInstall(uamqp ${PROJECT_SOURCE_DIR}/deps/uamqp ${PROJECT_SOURCE_DIR}/deps/uamqp -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")
findAndInstall(uamqp 1.0.25 ${PROJECT_SOURCE_DIR}/deps/uamqp ${PROJECT_SOURCE_DIR}/deps/uamqp -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")

###############################################################################
###########################Find/Install/Build umqtt############################
###############################################################################
findAndInstall(umqtt ${PROJECT_SOURCE_DIR}/deps/umqtt ${PROJECT_SOURCE_DIR}/deps/umqtt -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")
findAndInstall(umqtt 1.0.25 ${PROJECT_SOURCE_DIR}/deps/umqtt ${PROJECT_SOURCE_DIR}/deps/umqtt -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")

###############################################################################
#######################Find/Install/Build azure_iot_sdks#######################
Expand All @@ -36,4 +36,4 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/parson/README.md)
message(FATAL_ERROR "Error pulling parson submodule: ${res}")
endif()
endif()
findAndInstall(azure_iot_sdks ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c -Duse_installed_dependencies=ON -Dbuild_as_dynamic=ON -Drun_e2e_tests=ON -Duse_openssl=OFF -G "${CMAKE_GENERATOR}")
findAndInstall(azure_iot_sdks 1.1.5 ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c -Duse_installed_dependencies=ON -Dbuild_as_dynamic=ON -Drun_e2e_tests=ON -Duse_openssl=OFF -G "${CMAKE_GENERATOR}")
6 changes: 3 additions & 3 deletions dependencies-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ include("gatewayFunctions.cmake")
###############################################################################
############################Find/Install/Build ctest###########################
###############################################################################
findAndInstall(ctest ${PROJECT_SOURCE_DIR}/deps/ctest ${PROJECT_SOURCE_DIR}/deps/ctest -G "${CMAKE_GENERATOR}")
findAndInstall(ctest 1.1.0 ${PROJECT_SOURCE_DIR}/deps/ctest ${PROJECT_SOURCE_DIR}/deps/ctest -G "${CMAKE_GENERATOR}")

###############################################################################
#########################Find/Install/Build testrunner#########################
###############################################################################
findAndInstall(testrunnerswitcher ${PROJECT_SOURCE_DIR}/deps/testrunner ${PROJECT_SOURCE_DIR}/deps/testrunner -G "${CMAKE_GENERATOR}")
findAndInstall(testrunnerswitcher 1.1.0 ${PROJECT_SOURCE_DIR}/deps/testrunner ${PROJECT_SOURCE_DIR}/deps/testrunner -G "${CMAKE_GENERATOR}")

###############################################################################
###########################Find/Install/Build umock############################
###############################################################################
findAndInstall(umock_c ${PROJECT_SOURCE_DIR}/deps/umock-c ${PROJECT_SOURCE_DIR}/deps/umock-c -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")
findAndInstall(umock_c 1.1.0 ${PROJECT_SOURCE_DIR}/deps/umock-c ${PROJECT_SOURCE_DIR}/deps/umock-c -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")
2 changes: 1 addition & 1 deletion dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include("gatewayFunctions.cmake")
###############################################################################
###################Find/Install/Build azure_c_shared_utility###################
###############################################################################
findAndInstall(azure_c_shared_utility ${PROJECT_SOURCE_DIR}/deps/c-utility ${PROJECT_SOURCE_DIR}/deps/c-utility -Duse_installed_dependencies=ON -Drun_unittests=${run_unittests} -Dbuild_as_dynamic=ON -G "${CMAKE_GENERATOR}")
findAndInstall(azure_c_shared_utility 1.0.25 ${PROJECT_SOURCE_DIR}/deps/c-utility ${PROJECT_SOURCE_DIR}/deps/c-utility -Duse_installed_dependencies=ON -Drun_unittests=${run_unittests} -Dbuild_as_dynamic=ON -G "${CMAKE_GENERATOR}")
set(SHARED_UTIL_INC_FOLDER ${AZURE_C_SHARED_UTILITY_INCLUDE_DIR} CACHE INTERNAL "this is what needs to be included if using sharedLib lib" FORCE)
set(SHARED_UTIL_LIB_FOLDER ${AZURE_C_SHARED_LIBRARY_DIR} CACHE INTERNAL "this is what needs to be included if using sharedLib lib" FORCE)
set(SHARED_UTIL_LIB aziotsharedutil CACHE INTERNAL "this is what needs to be included if using sharedLib lib" FORCE)
Expand Down
6 changes: 3 additions & 3 deletions gatewayFunctions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ function(findAndInstallNonFindPkg libraryName submoduleRootDirectory cmakeRootDi
endfunction()

#Additional arguments to the specific projects cmake command may be specified after specifying the cmakeRootDirectory
function(findAndInstall libraryName submoduleRootDirectory cmakeRootDirectory)
function(findAndInstall libraryName version submoduleRootDirectory cmakeRootDirectory)

if(NOT ${libraryName}_FOUND)
find_package(${libraryName} QUIET CONFIG HINTS ${dependency_install_prefix})
find_package(${libraryName} ${version} QUIET CONFIG HINTS ${dependency_install_prefix})
if(NOT ${libraryName}_FOUND)
message(STATUS "${libraryName} not found...")
message(STATUS "Building ${libraryName}...")
Expand Down Expand Up @@ -124,7 +124,7 @@ function(findAndInstall libraryName submoduleRootDirectory cmakeRootDirectory)
endif()

#Attempt to find library with the REQUIRED option
find_package(${libraryName} REQUIRED CONFIG HINTS ${dependency_install_prefix})
find_package(${libraryName} ${version} REQUIRED CONFIG HINTS ${dependency_install_prefix})
endif()
endif()

Expand Down
6 changes: 3 additions & 3 deletions modules/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ include("../gatewayFunctions.cmake")
###############################################################################
###########################Find/Install/Build uamqp############################
###############################################################################
findAndInstall(uamqp ${PROJECT_SOURCE_DIR}/deps/uamqp ${PROJECT_SOURCE_DIR}/deps/uamqp -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")
findAndInstall(uamqp 1.0.25 ${PROJECT_SOURCE_DIR}/deps/uamqp ${PROJECT_SOURCE_DIR}/deps/uamqp -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")

###############################################################################
###########################Find/Install/Build umqtt############################
###############################################################################
findAndInstall(umqtt ${PROJECT_SOURCE_DIR}/deps/umqtt ${PROJECT_SOURCE_DIR}/deps/umqtt -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")
findAndInstall(umqtt 1.0.25 ${PROJECT_SOURCE_DIR}/deps/umqtt ${PROJECT_SOURCE_DIR}/deps/umqtt -Duse_installed_dependencies=ON -G "${CMAKE_GENERATOR}")

###############################################################################
#######################Find/Install/Build azure_iot_sdks#######################
Expand All @@ -36,4 +36,4 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/parson/README.md)
message(FATAL_ERROR "Error pulling parson submodule: ${res}")
endif()
endif()
findAndInstall(azure_iot_sdks ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c -Duse_installed_dependencies=ON -Duse_openssl=OFF -Dbuild_as_dynamic=ON -Drun_e2e_tests=ON -G "${CMAKE_GENERATOR}")
findAndInstall(azure_iot_sdks 1.1.5 ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c -Duse_installed_dependencies=ON -Duse_openssl=OFF -Dbuild_as_dynamic=ON -Drun_e2e_tests=ON -G "${CMAKE_GENERATOR}")

0 comments on commit 71be99a

Please sign in to comment.