summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-04-19 13:30:04 +0700
committerhathach <[email protected]>2021-04-19 13:30:04 +0700
commit59f0fa1e5e6767602c346bdd9371bf7d6caa9d08 (patch)
tree89072aab24057bb559b3f0b44e87ccfd3834b504
parent27c4a7db8df7d4e40359084eaa0ede4280651155 (diff)
cmake cleanup
-rw-r--r--examples/device/audio_4_channel_mic/CMakeLists.txt2
-rw-r--r--examples/device/audio_test/CMakeLists.txt2
-rw-r--r--examples/device/board_test/CMakeLists.txt6
-rw-r--r--examples/device/cdc_dual_ports/CMakeLists.txt2
-rw-r--r--examples/device/cdc_msc/CMakeLists.txt11
-rw-r--r--examples/device/cdc_msc_freertos/CMakeLists.txt2
-rw-r--r--examples/device/dfu_runtime/CMakeLists.txt2
-rw-r--r--examples/device/dynamic_configuration/CMakeLists.txt2
-rw-r--r--examples/device/hid_composite/CMakeLists.txt2
-rw-r--r--examples/device/hid_generic_inout/CMakeLists.txt2
-rw-r--r--examples/device/hid_multiple_interface/CMakeLists.txt2
-rw-r--r--examples/device/midi_test/CMakeLists.txt2
-rw-r--r--examples/device/msc_dual_lun/CMakeLists.txt2
-rw-r--r--examples/device/net_lwip_webserver/CMakeLists.txt2
-rw-r--r--examples/device/uac2_headset/CMakeLists.txt2
-rw-r--r--examples/device/usbtmc/CMakeLists.txt2
-rw-r--r--examples/device/webusb_serial/CMakeLists.txt2
-rw-r--r--examples/host/cdc_msc_hid/CMakeLists.txt2
18 files changed, 24 insertions, 25 deletions
diff --git a/examples/device/audio_4_channel_mic/CMakeLists.txt b/examples/device/audio_4_channel_mic/CMakeLists.txt
index 9cae652ea..f2c81c4d3 100644
--- a/examples/device/audio_4_channel_mic/CMakeLists.txt
+++ b/examples/device/audio_4_channel_mic/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/audio_test/CMakeLists.txt b/examples/device/audio_test/CMakeLists.txt
index 9cae652ea..f2c81c4d3 100644
--- a/examples/device/audio_test/CMakeLists.txt
+++ b/examples/device/audio_test/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/board_test/CMakeLists.txt b/examples/device/board_test/CMakeLists.txt
index 698b0c96f..c41ad92ab 100644
--- a/examples/device/board_test/CMakeLists.txt
+++ b/examples/device/board_test/CMakeLists.txt
@@ -1,4 +1,6 @@
-# use directory name for project id
+cmake_minimum_required(VERSION 3.5)
+
+# use BOARD-Directory name for project id
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME)
set(PROJECT ${BOARD}-${PROJECT})
@@ -38,5 +40,5 @@ elseif(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/cdc_dual_ports/CMakeLists.txt b/examples/device/cdc_dual_ports/CMakeLists.txt
index bb6416cc7..4160c0c88 100644
--- a/examples/device/cdc_dual_ports/CMakeLists.txt
+++ b/examples/device/cdc_dual_ports/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/cdc_msc/CMakeLists.txt b/examples/device/cdc_msc/CMakeLists.txt
index ca8f07ade..6c828a396 100644
--- a/examples/device/cdc_msc/CMakeLists.txt
+++ b/examples/device/cdc_msc/CMakeLists.txt
@@ -7,18 +7,13 @@ set(TOP "../../..")
get_filename_component(TOP "${TOP}" REALPATH)
# Check for -DFAMILY=
-if(FAMILY MATCHES "^(esp32s[2-3])*")
- cmake_minimum_required(VERSION 3.5)
- include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
- project(${PROJECT})
-
-elseif(FAMILY STREQUAL "rp2040")
+if(FAMILY STREQUAL "rp2040")
cmake_minimum_required(VERSION 3.12)
include(${TOP}/hw/bsp/${FAMILY}/pico_sdk_import.cmake)
project(${PROJECT})
add_executable(${PROJECT})
-
+
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
# Example source
@@ -39,5 +34,5 @@ elseif(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/cdc_msc_freertos/CMakeLists.txt b/examples/device/cdc_msc_freertos/CMakeLists.txt
index aaac4d894..1d04a8518 100644
--- a/examples/device/cdc_msc_freertos/CMakeLists.txt
+++ b/examples/device/cdc_msc_freertos/CMakeLists.txt
@@ -10,6 +10,8 @@ get_filename_component(TOP "${TOP}" REALPATH)
# Check for -DFAMILY=
if(FAMILY MATCHES "^esp32s[2-3]")
+ cmake_minimum_required(VERSION 3.5)
+
include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
project(${PROJECT})
diff --git a/examples/device/dfu_runtime/CMakeLists.txt b/examples/device/dfu_runtime/CMakeLists.txt
index d59d2e9a1..2bac7c329 100644
--- a/examples/device/dfu_runtime/CMakeLists.txt
+++ b/examples/device/dfu_runtime/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/dynamic_configuration/CMakeLists.txt b/examples/device/dynamic_configuration/CMakeLists.txt
index a9c343994..a99b755d3 100644
--- a/examples/device/dynamic_configuration/CMakeLists.txt
+++ b/examples/device/dynamic_configuration/CMakeLists.txt
@@ -34,5 +34,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/hid_composite/CMakeLists.txt b/examples/device/hid_composite/CMakeLists.txt
index 7f85a3a40..3b677b3b1 100644
--- a/examples/device/hid_composite/CMakeLists.txt
+++ b/examples/device/hid_composite/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/hid_generic_inout/CMakeLists.txt b/examples/device/hid_generic_inout/CMakeLists.txt
index d59d2e9a1..2bac7c329 100644
--- a/examples/device/hid_generic_inout/CMakeLists.txt
+++ b/examples/device/hid_generic_inout/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/hid_multiple_interface/CMakeLists.txt b/examples/device/hid_multiple_interface/CMakeLists.txt
index d59d2e9a1..2bac7c329 100644
--- a/examples/device/hid_multiple_interface/CMakeLists.txt
+++ b/examples/device/hid_multiple_interface/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/midi_test/CMakeLists.txt b/examples/device/midi_test/CMakeLists.txt
index d59d2e9a1..2bac7c329 100644
--- a/examples/device/midi_test/CMakeLists.txt
+++ b/examples/device/midi_test/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/msc_dual_lun/CMakeLists.txt b/examples/device/msc_dual_lun/CMakeLists.txt
index 454c5a08a..8b4722278 100644
--- a/examples/device/msc_dual_lun/CMakeLists.txt
+++ b/examples/device/msc_dual_lun/CMakeLists.txt
@@ -34,5 +34,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/net_lwip_webserver/CMakeLists.txt b/examples/device/net_lwip_webserver/CMakeLists.txt
index 76f7be6cc..4325b4ea6 100644
--- a/examples/device/net_lwip_webserver/CMakeLists.txt
+++ b/examples/device/net_lwip_webserver/CMakeLists.txt
@@ -80,5 +80,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/uac2_headset/CMakeLists.txt b/examples/device/uac2_headset/CMakeLists.txt
index d59d2e9a1..2bac7c329 100644
--- a/examples/device/uac2_headset/CMakeLists.txt
+++ b/examples/device/uac2_headset/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/usbtmc/CMakeLists.txt b/examples/device/usbtmc/CMakeLists.txt
index f9ba2b529..c14595dbe 100644
--- a/examples/device/usbtmc/CMakeLists.txt
+++ b/examples/device/usbtmc/CMakeLists.txt
@@ -34,5 +34,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/webusb_serial/CMakeLists.txt b/examples/device/webusb_serial/CMakeLists.txt
index d59d2e9a1..2bac7c329 100644
--- a/examples/device/webusb_serial/CMakeLists.txt
+++ b/examples/device/webusb_serial/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/host/cdc_msc_hid/CMakeLists.txt b/examples/host/cdc_msc_hid/CMakeLists.txt
index 1b2be4565..a9a4f08ad 100644
--- a/examples/host/cdc_msc_hid/CMakeLists.txt
+++ b/examples/host/cdc_msc_hid/CMakeLists.txt
@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
)
else()
- message(FATAL_ERROR "Invalid FAMILY specified")
+ message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()