[OpenWrt-Devel] [PATCH] uqmi: Support for out of source builds added
Bachtin, Dmitri
dbachtin at init-ka.de
Thu Nov 19 07:31:02 EST 2015
The scripts gen-{header,code,error-list}.pl were called with
source-local paths what disallowed out of source builds.
Updated CMakeLists.txt to call the scripts with ${CMAKE_SOURCE_DIR}
prefix.
Signed-off-by: Dmitri Bachtin <dbachtin at init-ka.de>
---
CMakeLists.txt | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a11544..2e03024 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,24 +34,24 @@ SET(service_headers)
SET(service_sources)
FOREACH(service ctl dms nas pds wds wms wda)
ADD_CUSTOM_COMMAND(
- OUTPUT qmi-message-${service}.h
- COMMAND ./data/gen-header.pl ${service}_ ./data/qmi-service-${service}.json > qmi-message-${service}.h
- DEPENDS ./data/gen-header.pl ./data/qmi-service-${service}.json ./data/gen-common.pm
+ OUTPUT ${CMAKE_SOURCE_DIR}/qmi-message-${service}.h
+ COMMAND ${CMAKE_SOURCE_DIR}/data/gen-header.pl ${service}_ ${CMAKE_SOURCE_DIR}/data/qmi-service-${service}.json > ${CMAKE_SOURCE_DIR}/qmi-message-${service}.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/data/gen-header.pl ${CMAKE_SOURCE_DIR}/data/qmi-service-${service}.json ${CMAKE_SOURCE_DIR}/data/gen-common.pm
)
SET(service_headers ${service_headers} qmi-message-${service}.h)
ADD_CUSTOM_COMMAND(
- OUTPUT qmi-message-${service}.c
- COMMAND ./data/gen-code.pl ${service}_ ./data/qmi-service-${service}.json > qmi-message-${service}.c
- DEPENDS ./data/gen-code.pl ./data/qmi-service-${service}.json ./data/gen-common.pm
+ OUTPUT ${CMAKE_SOURCE_DIR}/qmi-message-${service}.c
+ COMMAND ${CMAKE_SOURCE_DIR}/data/gen-code.pl ${service}_ ${CMAKE_SOURCE_DIR}/data/qmi-service-${service}.json > ${CMAKE_SOURCE_DIR}/qmi-message-${service}.c
+ DEPENDS ${CMAKE_SOURCE_DIR}/data/gen-code.pl ${CMAKE_SOURCE_DIR}/data/qmi-service-${service}.json ${CMAKE_SOURCE_DIR}/data/gen-common.pm
)
SET(service_sources ${service_sources} qmi-message-${service}.c)
set_property(SOURCE qmi-message-${service}.c PROPERTY COMPILE_FLAGS "-Wno-unused")
ENDFOREACH()
ADD_CUSTOM_COMMAND(
- OUTPUT qmi-errors.c
- COMMAND ./data/gen-error-list.pl ./qmi-errors.h > qmi-errors.c
- DEPENDS ./data/gen-error-list.pl ./qmi-errors.h
+ OUTPUT ${CMAKE_SOURCE_DIR}/qmi-errors.c
+ COMMAND ${CMAKE_SOURCE_DIR}/data/gen-error-list.pl ${CMAKE_SOURCE_DIR}/qmi-errors.h > ${CMAKE_SOURCE_DIR}/qmi-errors.c
+ DEPENDS ${CMAKE_SOURCE_DIR}/data/gen-error-list.pl ${CMAKE_SOURCE_DIR}/qmi-errors.h
)
ADD_CUSTOM_TARGET(gen-errors DEPENDS qmi-errors.c)
ADD_CUSTOM_TARGET(gen-headers DEPENDS ${service_headers})
--
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list