diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/asiosdk/Findasiosdk.cmake | |
Diffstat (limited to 'vcpkg/ports/asiosdk/Findasiosdk.cmake')
| -rw-r--r-- | vcpkg/ports/asiosdk/Findasiosdk.cmake | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/vcpkg/ports/asiosdk/Findasiosdk.cmake b/vcpkg/ports/asiosdk/Findasiosdk.cmake new file mode 100644 index 0000000..c88f7df --- /dev/null +++ b/vcpkg/ports/asiosdk/Findasiosdk.cmake @@ -0,0 +1,44 @@ +if(WIN32)
+else(WIN32)
+ message(FATAL_ERROR "Findasiosdk.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" )
+endif(WIN32)
+
+# if this script is invoked multiple times, we end up adding
+# "asiosdk" to the directory multiple times, leading to incorrect
+# include paths
+if (ASIOSDK_ROOT_DIR)
+ return()
+endif()
+
+find_path(
+ ASIOSDK_ROOT_DIR
+ asiosdk
+)
+
+if (NOT "${ASIOSDK_ROOT_DIR}" STREQUAL "")
+ set(ASIOSDK_ROOT_DIR
+ ${ASIOSDK_ROOT_DIR}/asiosdk
+ )
+endif()
+
+find_path(ASIOSDK_INCLUDE_DIR
+ asio.h
+ PATHS
+ ${ASIOSDK_ROOT_DIR}/common
+)
+
+
+if (NOT "${ASIOSDK_ROOT_DIR}" STREQUAL "")
+ set (ASIOSDK_INCLUDE_DIR
+ ${ASIOSDK_ROOT_DIR}/common
+ ${ASIOSDK_ROOT_DIR}/host
+ ${ASIOSDK_ROOT_DIR}/hostpc
+ )
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(ASIOSDK DEFAULT_MSG ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(
+ ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR
+)
|