# QWT if(DEFINED ENV{QWT_ROOT}) message(STATUS "QWT_ROOT environment variable defined, using QWT_ROOT paths.") # copy QWT dlls for easy launch if (WIN32) file(GLOB_RECURSE QWT_DLLS "$ENV{QWT_ROOT}/lib/*.dll" ) file(COPY ${QWT_DLLS} DESTINATION ${CMAKE_BINARY_DIR}) file(COPY ${QWT_DLLS} DESTINATION ${CMAKE_BINARY_DIR}/Tests) endif() else() configure_file(CMakeLists.txt.qwt qwt/CMakeLists.txt) execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
时间: 2024-02-24 13:54:12 浏览: 75
qwt.rar_qwt_qwt 6.0.1 xp_qwt qt_qwt_data.h
根据你提供的代码片段,我发现在该语句之前确实缺少了一个右括号,尤其是在 `if(DEFINED ENV{QWT_ROOT})` 这一行后面,需要加上一个右括号来闭合这个 if 语句块。你可以尝试修改代码如下:
```
# QWT
if(DEFINED ENV{QWT_ROOT})
message(STATUS "QWT_ROOT environment variable defined, using QWT_ROOT paths.")
# copy QWT dlls for easy launch
if (WIN32)
file(GLOB_RECURSE QWT_DLLS "$ENV{QWT_ROOT}/lib/*.dll" )
file(COPY ${QWT_DLLS} DESTINATION ${CMAKE_BINARY_DIR})
file(COPY ${QWT_DLLS} DESTINATION ${CMAKE_BINARY_DIR}/Tests)
endif()
else()
configure_file(CMakeLists.txt.qwt qwt/CMakeLists.txt)
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .)
```
这样修改之后应该可以避免缺少右括号的问题。
阅读全文