cppcheck/cli/CMakeLists.txt

24 lines
548 B
CMake
Raw Normal View History

2015-02-13 19:00:14 +01:00
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
include_directories(${PROJECT_SOURCE_DIR}/lib/)
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
file(GLOB mainfile "main.cpp")
list(REMOVE_ITEM srcs ${mainfile})
link_libraries(${PROJECT_NAME} tinyxml)
add_library(cli_lib OBJECT ${hdrs} ${srcs})
add_executable(cppcheck main.cpp
$<TARGET_OBJECTS:cli_lib>
)
install(TARGETS cppcheck
RUNTIME DESTINATION bin
COMPONENT applications)
install(FILES ${cfgs}
DESTINATION share/${PROJECT_NAME}/
COMPONENT headers)