cmake generate right project tree
This commit is contained in:
@@ -109,6 +109,10 @@ macro(pip_module NAME LIBS LABEL INCLUDES SOURCES MSG)
|
||||
list(APPEND HDRS ${HS})
|
||||
list(APPEND PHDRS ${PHS})
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
|
||||
else()
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${CPPS} ${HS} ${PHS})
|
||||
endif()
|
||||
set(_target "pip_${NAME}")
|
||||
set(_libs "${LIBS}")
|
||||
if ("${NAME}" STREQUAL "main")
|
||||
@@ -140,7 +144,7 @@ macro(pip_module NAME LIBS LABEL INCLUDES SOURCES MSG)
|
||||
pip_resources(CRES "${RES}")
|
||||
endif()
|
||||
add_definitions(-D${DEF_NAME})
|
||||
add_library(${_target} ${PIP_LIB_TYPE} ${CPPS} ${CRES} ${_RC})
|
||||
add_library(${_target} ${PIP_LIB_TYPE} ${CPPS} ${CRES} ${_RC} ${HS} ${PHS})
|
||||
target_include_directories(${_target} PUBLIC ${PIP_INCLUDES})
|
||||
if (NOT "x${RES}" STREQUAL "x")
|
||||
add_dependencies(${_target} pip_rc)
|
||||
|
||||
Reference in New Issue
Block a user