cmake:migrate apps CMakeLists for canutils
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
6cd890e843
commit
24319beed3
@ -18,4 +18,6 @@
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
nuttx_add_subdirectory()
|
||||
|
||||
nuttx_generate_kconfig(MENUDESC "CAN Utilities")
|
||||
|
37
canutils/candump/CMakeLists.txt
Normal file
37
canutils/candump/CMakeLists.txt
Normal file
@ -0,0 +1,37 @@
|
||||
# ##############################################################################
|
||||
# apps/canutils/candump/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
if(CONFIG_CANUTILS_CANDUMP)
|
||||
|
||||
set(LIBCANUTILS_DIR ${NUTTX_APPS_DIR}/canutils/libcanutils)
|
||||
|
||||
nuttx_add_application(
|
||||
NAME
|
||||
candump
|
||||
STACKSIZE
|
||||
${CONFIG_CANUTILS_CANDUMP_STACKSIZE}
|
||||
MODULE
|
||||
${CONFIG_CANUTILS_CANDUMP}
|
||||
SRCS
|
||||
candump.c
|
||||
INCLUDE_DIRECTORIES
|
||||
${LIBCANUTILS_DIR})
|
||||
|
||||
endif()
|
26
canutils/canlib/CMakeLists.txt
Normal file
26
canutils/canlib/CMakeLists.txt
Normal file
@ -0,0 +1,26 @@
|
||||
# ##############################################################################
|
||||
# apps/canutils/canlib/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
if(CONFIG_CANUTILS_CANLIB)
|
||||
|
||||
target_sources(
|
||||
apps PRIVATE canlib_getbaud.c canlib_setbaud.c canlib_getloopback.c
|
||||
canlib_setloopback.c canlib_getsilent.c canlib_setsilent.c)
|
||||
|
||||
endif()
|
37
canutils/cansend/CMakeLists.txt
Normal file
37
canutils/cansend/CMakeLists.txt
Normal file
@ -0,0 +1,37 @@
|
||||
# ##############################################################################
|
||||
# apps/canutils/cansend/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
if(CONFIG_CANUTILS_CANSEND)
|
||||
|
||||
set(LIBCANUTILS_DIR ${NUTTX_APPS_DIR}/canutils/libcanutils)
|
||||
|
||||
nuttx_add_application(
|
||||
NAME
|
||||
cansend
|
||||
STACKSIZE
|
||||
${CONFIG_CANUTILS_CANSEND_STACKSIZE}
|
||||
MODULE
|
||||
${CONFIG_CANUTILS_CANSEND}
|
||||
SRCS
|
||||
cansend.c
|
||||
INCLUDE_DIRECTORIES
|
||||
${LIBCANUTILS_DIR})
|
||||
|
||||
endif()
|
25
canutils/libcanutils/CMakeLists.txt
Normal file
25
canutils/libcanutils/CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
||||
# ##############################################################################
|
||||
# apps/canutils/libcanutils/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
if(CONFIG_CANUTILS_LIBCANUTILS)
|
||||
|
||||
target_sources(apps PRIVATE lib.c)
|
||||
|
||||
endif()
|
26
canutils/libobd2/CMakeLists.txt
Normal file
26
canutils/libobd2/CMakeLists.txt
Normal file
@ -0,0 +1,26 @@
|
||||
# ##############################################################################
|
||||
# apps/canutils/libobd2/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
if(CONFIG_CANUTILS_LIBOBD2)
|
||||
|
||||
target_sources(apps PRIVATE obd2.c obd_sendrequest.c obd_waitresponse.c
|
||||
obd_decodepid.c)
|
||||
|
||||
endif()
|
33
canutils/slcan/CMakeLists.txt
Normal file
33
canutils/slcan/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
||||
# ##############################################################################
|
||||
# apps/canutils/slcan/CMakeLists.txt
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
if(CONFIG_CANUTILS_SLCAN)
|
||||
|
||||
nuttx_add_application(
|
||||
NAME
|
||||
slcan
|
||||
STACKSIZE
|
||||
${CONFIG_CANUTILS_SLCAN_STACKSIZE}
|
||||
MODULE
|
||||
${CONFIG_CANUTILS_SLCAN}
|
||||
SRCS
|
||||
slcan.c)
|
||||
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user