no message
parent
d24267b620
commit
da25df7311
|
@ -1,31 +1,52 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
message("configure qsswraper for " ${PROJECT_NAME})
|
||||
|
||||
message("system name is " ${CMAKE_SYSTEM_NAME})
|
||||
|
||||
set(PWD ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
set(PUBLIC_HEADERS ${PWD}/qextserialport.h
|
||||
${PWD}/qextserialenumerator.h
|
||||
${PWD}/qextserialport_global.h
|
||||
)
|
||||
|
||||
set(HEADERS $$PUBLIC_HEADERS
|
||||
$$PWD/qextserialport_p.h
|
||||
$$PWD/qextserialenumerator_p.h
|
||||
set(PUBLIC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/qextserialport.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/qextserialenumerator.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/qextserialport_global.h
|
||||
)
|
||||
list(APPEND EXTSERIAL_HEADERS
|
||||
${PUBLIC_HEADERS}
|
||||
${CMAKE_CURRENT_LIST_DIR}/qextserialport_p.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/qextserialenumerator_p.h
|
||||
)
|
||||
|
||||
|
||||
set(SOURCES
|
||||
$$PWD/qextserialport.cpp
|
||||
$$PWD/qextserialenumerator.cpp)
|
||||
|
||||
|
||||
list(APPEND EXTSERIAL_SOURCES
|
||||
${CMAKE_CURRENT_LIST_DIR}/qextserialport.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/qextserialenumerator.cpp
|
||||
)
|
||||
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
list(APPEND EXTSERIAL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/qextserialport_unix.cpp)
|
||||
list(APPEND EXTSERIAL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/qextserialenumerator_linux.cpp)
|
||||
|
||||
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
list(APPEND EXTSERIAL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/qextserialport_win.cpp)
|
||||
list(APPEND EXTSERIAL_SOURCES ${CMAKE_CURRENT_LIST_DIR}/qextserialenumerator_win.cpp)
|
||||
|
||||
link_libraries(setupapi advapi32 user32)
|
||||
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
|
||||
ELSE ()
|
||||
ENDIF()
|
||||
|
||||
QT5_WRAP_CPP(EXTSERIAL_MOC_SOURCE ${EXTSERIAL_SOURCES} ) # moc预编译代码
|
||||
QT5_WRAP_CPP(EXTSERIAL_MOC_HEADER ${EXTSERIAL_HEADERS} ) # moc预编译代码
|
||||
|
||||
|
||||
list(APPEND MOC ${EXTSERIAL_MOC_SOURCE})
|
||||
list(APPEND SOURCES ${EXTSERIAL_SOURCES})
|
||||
|
||||
|
||||
FOREACH(list ${EXTSERIAL_MOC_SOURCE})
|
||||
get_filename_component(BIN_PATH ${list} "DIRECTORY" )
|
||||
message("EXTSERIAL_MOC_SOURCE file" ${list})
|
||||
ENDFOREACH(list)
|
||||
|
||||
FOREACH(list ${EXTSERIAL_MOC_HEADER})
|
||||
message("EXTSERIAL_MOC_HEADER file " ${list})
|
||||
ENDFOREACH(list)
|
||||
|
||||
message("EXTSERIAL_MOC_SOURCE file " ${BIN_PATH})
|
||||
include_directories(${BIN_PATH})
|
||||
include_directories(${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue