Skip to content

Commit

Permalink
Remove cmake extra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfodagain committed Dec 2, 2024
1 parent 4378227 commit 292580d
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 95 deletions.
38 changes: 19 additions & 19 deletions devicedefender/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,27 @@ if (WIN32)
endif ()
endif()

add_library(${PROJECT_NAME} ${AWS_IOTDEVICEDEFENDER_CPP_SRC})
add_library(IotDeviceDefender-cpp ${AWS_IOTDEVICEDEFENDER_CPP_SRC})

set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(IotDeviceDefender-cpp PROPERTIES LINKER_LANGUAGE CXX)

set(CMAKE_C_FLAGS_DEBUGOPT "")

#set warnings
if (MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX)
target_compile_options(IotDeviceDefender-cpp PRIVATE /W4 /WX)
else ()
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror)
target_compile_options(IotDeviceDefender-cpp PRIVATE -Wall -Wno-long-long -pedantic -Werror)
endif ()

target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>)
target_compile_definitions(IotDeviceDefender-cpp PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>)

if (BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PUBLIC "-DAWS_IOTDEVICEDEFENDER_USE_IMPORT_EXPORT")
target_compile_definitions(${PROJECT_NAME} PRIVATE "-DAWS_IOTDEVICEDEFENDER_EXPORTS")
target_compile_definitions(IotDeviceDefender-cpp PUBLIC "-DAWS_IOTDEVICEDEFENDER_USE_IMPORT_EXPORT")
target_compile_definitions(IotDeviceDefender-cpp PRIVATE "-DAWS_IOTDEVICEDEFENDER_EXPORTS")

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotDeviceDefender-cpp
EXPORT IotDeviceDefender-cpp-targets
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Development
Expand All @@ -78,20 +78,20 @@ if (BUILD_SHARED_LIBS)
DESTINATION ${RUNTIME_DIRECTORY}
COMPONENT Runtime)

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotDeviceDefender-cpp
EXPORT IotDeviceDefender-cpp-targets
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
NAMELINK_ONLY
COMPONENT Development)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotDeviceDefender-cpp
EXPORT IotDeviceDefender-cpp-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Development)
endif()

target_include_directories(${PROJECT_NAME} PUBLIC
target_include_directories(IotDeviceDefender-cpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

Expand All @@ -102,9 +102,9 @@ if (BUILD_DEPS)
endif()
endif()

aws_add_sanitizers(${PROJECT_NAME})
aws_add_sanitizers(IotDeviceDefender-cpp)

target_link_libraries(${PROJECT_NAME} PUBLIC IotDeviceCommon-cpp)
target_link_libraries(IotDeviceDefender-cpp PUBLIC IotDeviceCommon-cpp)

install(FILES ${AWS_IOTDEVICEDEFENDER_HEADERS} DESTINATION "include/aws/iotdevicedefender/" COMPONENT Development)

Expand All @@ -122,8 +122,8 @@ if (DEFINED SIMPLE_VERSION)
)
endif()

install(EXPORT "${PROJECT_NAME}-targets"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/${TARGET_DIR}"
install(EXPORT "IotDeviceDefender-cpp-targets"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/IotDeviceDefender-cpp/cmake/${TARGET_DIR}"
NAMESPACE AWS::
COMPONENT Development)

Expand All @@ -132,7 +132,7 @@ configure_file("cmake/iotdevicedefender-cpp-config.cmake"
@ONLY)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/iotdevicedefender-cpp-config.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/IotDeviceDefender-cpp/cmake/"
COMPONENT Development)

if (BUILD_TESTING)
Expand Down
39 changes: 20 additions & 19 deletions iotdevicecommon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,27 @@ endif()

aws_use_package(aws-c-iot)

add_library(${PROJECT_NAME} ${AWS_IOTDEVICECOMMON_CPP_SRC})
add_library(IotDeviceCommon-cpp ${AWS_IOTDEVICECOMMON_CPP_SRC})

set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(IotDeviceCommon-cpp PROPERTIES LINKER_LANGUAGE CXX)

set(CMAKE_C_FLAGS_DEBUGOPT "")

#set warnings
if (MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX)
target_compile_options(IotDeviceCommon-cpp PRIVATE /W4 /WX)
else ()
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror)
target_compile_options(IotDeviceCommon-cpp PRIVATE -Wall -Wno-long-long -pedantic -Werror)
endif ()

target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>)
target_compile_definitions(IotDeviceCommon-cpp PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>)

if (BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PUBLIC "-DAWS_IOTDEVICECOMMON_USE_IMPORT_EXPORT")
target_compile_definitions(${PROJECT_NAME} PRIVATE "-DAWS_IOTDEVICECOMMON_EXPORTS")
target_compile_definitions(IotDeviceCommon-cpp PUBLIC "-DAWS_IOTDEVICECOMMON_USE_IMPORT_EXPORT")
target_compile_definitions(IotDeviceCommon-cpp PRIVATE "-DAWS_IOTDEVICECOMMON_EXPORTS")

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotDeviceCommon-cpp
EXPORT IotDeviceCommon-cpp-targets
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Development
Expand All @@ -80,20 +80,20 @@ if (BUILD_SHARED_LIBS)
DESTINATION ${RUNTIME_DIRECTORY}
COMPONENT Runtime)

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotDeviceCommon-cpp
EXPORT IotDeviceCommon-cpp-targets
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
NAMELINK_ONLY
COMPONENT Development)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotDeviceCommon-cpp
EXPORT IotDeviceCommon-cpp-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Development)
endif()

target_include_directories(${PROJECT_NAME} PUBLIC
target_include_directories(IotDeviceCommon-cpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

Expand All @@ -104,8 +104,9 @@ if (BUILD_DEPS)
aws_use_package(aws-c-iot)
endif()

aws_add_sanitizers(${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS})
aws_add_sanitizers(IotDeviceCommon-cpp)

target_link_libraries(IotDeviceCommon-cpp PUBLIC ${DEP_AWS_LIBS})

install(FILES ${AWS_IOTDEVICECOMMON_HEADERS} DESTINATION "include/aws/iotdevicecommon/" COMPONENT Development)

Expand All @@ -123,8 +124,8 @@ if (DEFINED SIMPLE_VERSION)
)
endif()

install(EXPORT "${PROJECT_NAME}-targets"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/${TARGET_DIR}"
install(EXPORT "IotDeviceCommon-cpp-targets"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/IotDeviceCommon-cpp/cmake/${TARGET_DIR}"
NAMESPACE AWS::
COMPONENT Development)

Expand All @@ -133,5 +134,5 @@ configure_file("cmake/iotdevicecommon-cpp-config.cmake"
@ONLY)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/iotdevicecommon-cpp-config.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/IotDeviceCommon-cpp/cmake/"
COMPONENT Development)
38 changes: 19 additions & 19 deletions jobs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,27 @@ if (WIN32)
endif ()
endif()

add_library(${PROJECT_NAME} ${AWS_IOTJOBS_CPP_SRC})
add_library(IotJobs-cpp ${AWS_IOTJOBS_CPP_SRC})

set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(IotJobs-cpp PROPERTIES LINKER_LANGUAGE CXX)

set(CMAKE_C_FLAGS_DEBUGOPT "")

#set warnings
if (MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX)
target_compile_options(IotJobs-cpp PRIVATE /W4 /WX)
else ()
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror)
target_compile_options(IotJobs-cpp PRIVATE -Wall -Wno-long-long -pedantic -Werror)
endif ()

target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>)
target_compile_definitions(IotJobs-cpp PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>)

if (BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PUBLIC "-DAWS_IOTJOBS_USE_IMPORT_EXPORT")
target_compile_definitions(${PROJECT_NAME} PRIVATE "-DAWS_IOTJOBS_EXPORTS")
target_compile_definitions(IotJobs-cpp PUBLIC "-DAWS_IOTJOBS_USE_IMPORT_EXPORT")
target_compile_definitions(IotJobs-cpp PRIVATE "-DAWS_IOTJOBS_EXPORTS")

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotJobs-cpp
EXPORT IotJobs-cpp-targets
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Development
Expand All @@ -80,20 +80,20 @@ if (BUILD_SHARED_LIBS)
DESTINATION ${RUNTIME_DIRECTORY}
COMPONENT Runtime)

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotJobs-cpp
EXPORT IotJobs-cpp-targets
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
NAMELINK_ONLY
COMPONENT Development)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotJobs-cpp
EXPORT IotJobs-cpp-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Development)
endif()

target_include_directories(${PROJECT_NAME} PUBLIC
target_include_directories(IotJobs-cpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

Expand All @@ -103,9 +103,9 @@ if (BUILD_DEPS)
endif()
endif()

aws_add_sanitizers(${PROJECT_NAME})
aws_add_sanitizers(IotJobs-cpp)

target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS})
target_link_libraries(IotJobs-cpp PUBLIC ${DEP_AWS_LIBS})

install(FILES ${AWS_IOTJOBS_HEADERS} DESTINATION "include/aws/iotjobs/" COMPONENT Development)

Expand All @@ -123,8 +123,8 @@ if (DEFINED SIMPLE_VERSION)
)
endif()

install(EXPORT "${PROJECT_NAME}-targets"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/${TARGET_DIR}"
install(EXPORT "IotJobs-cpp-targets"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/IotJobs-cpp/cmake/${TARGET_DIR}"
NAMESPACE AWS::
COMPONENT Development)

Expand All @@ -133,5 +133,5 @@ configure_file("cmake/iotjobs-cpp-config.cmake"
@ONLY)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/iotjobs-cpp-config.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/IotJobs-cpp/cmake/"
COMPONENT Development)
38 changes: 19 additions & 19 deletions secure_tunneling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,27 @@ if (WIN32)
endif ()
endif()

add_library(${PROJECT_NAME} ${AWS_IOTSECURETUNNELING_CPP_SRC})
add_library(IotSecureTunneling-cpp ${AWS_IOTSECURETUNNELING_CPP_SRC})

set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(IotSecureTunneling-cpp PROPERTIES LINKER_LANGUAGE CXX)

set(CMAKE_C_FLAGS_DEBUGOPT "")

#set warnings
if (MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX)
target_compile_options(IotSecureTunneling-cpp PRIVATE /W4 /WX)
else ()
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror)
target_compile_options(IotSecureTunneling-cpp PRIVATE -Wall -Wno-long-long -pedantic -Werror)
endif ()

target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>)
target_compile_definitions(IotSecureTunneling-cpp PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>)

if (BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PUBLIC "-DAWS_IOTSECURETUNNELING_USE_IMPORT_EXPORT")
target_compile_definitions(${PROJECT_NAME} PRIVATE "-DAWS_IOTSECURETUNNELING_EXPORTS")
target_compile_definitions(IotSecureTunneling-cpp PUBLIC "-DAWS_IOTSECURETUNNELING_USE_IMPORT_EXPORT")
target_compile_definitions(IotSecureTunneling-cpp PRIVATE "-DAWS_IOTSECURETUNNELING_EXPORTS")

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotSecureTunneling-cpp
EXPORT IotSecureTunneling-cpp-targets
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Development
Expand All @@ -78,20 +78,20 @@ if (BUILD_SHARED_LIBS)
DESTINATION ${RUNTIME_DIRECTORY}
COMPONENT Runtime)

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotSecureTunneling-cpp
EXPORT IotSecureTunneling-cpp-targets
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
NAMELINK_ONLY
COMPONENT Development)
else()
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
install(TARGETS IotSecureTunneling-cpp
EXPORT IotSecureTunneling-cpp-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Development)
endif()

target_include_directories(${PROJECT_NAME} PUBLIC
target_include_directories(IotSecureTunneling-cpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

Expand All @@ -102,9 +102,9 @@ if (BUILD_DEPS)
endif()
endif()

aws_add_sanitizers(${PROJECT_NAME})
aws_add_sanitizers(IotSecureTunneling-cpp)

target_link_libraries(${PROJECT_NAME} PUBLIC IotDeviceCommon-cpp)
target_link_libraries(IotSecureTunneling-cpp PUBLIC IotDeviceCommon-cpp)

install(FILES ${AWS_IOTSECURETUNNELING_HEADERS} DESTINATION "include/aws/iotsecuretunneling/" COMPONENT Development)

Expand All @@ -122,8 +122,8 @@ if (DEFINED SIMPLE_VERSION)
)
endif()

install(EXPORT "${PROJECT_NAME}-targets"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/${TARGET_DIR}"
install(EXPORT "IotSecureTunneling-cpp-targets"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/IotSecureTunneling-cpp/cmake/${TARGET_DIR}"
NAMESPACE AWS::
COMPONENT Development)

Expand All @@ -132,5 +132,5 @@ configure_file("cmake/iotsecuretunneling-cpp-config.cmake"
@ONLY)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/iotsecuretunneling-cpp-config.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/IotSecureTunneling-cpp/cmake/"
COMPONENT Development)
Loading

0 comments on commit 292580d

Please sign in to comment.