Skip to content

AWSSDK with CMake and find_package on Windows #3153

Discussion options

You must be logged in to vote

OK I've given up trying to work this out and as there's been no response I've crafted the following which does at least seem to work. I'll post it here for feedback and in the hope someone else finds it useful:

if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")

    # ensure the AWSSDK root directory has been specified
    if (${AWSSDK_DIR} STREQUAL "")
        message(FATAL_ERROR "Please define AWSSDK_DIR=...")
    endif()

    # look for the expected header in that directory
    set(AWSSDK_INCLUDE_DIRS "${AWSSDK_DIR}/include")
    set(AWS_HEADER "${AWSSDK_INCLUDE_DIRS}/aws/core/Aws.h")
    if(NOT EXISTS ${AWS_HEADER})
        message(FATAL_ERROR "Unable to locate ${AWS_HEADER}")
    endif()

…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jmklix
Comment options

Answer selected by jmklix
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants