cppcheck/cli/CMakeLists.txt

34 lines
590 B
CMake
Raw Normal View History

# Minimal CMake build file to build cppcheck command line executable
SET(CHECKCLI_SRCS
cppcheckexecutor.cpp
threadexecutor.cpp
main.cpp
)
# Add Windows resource file
if (WIN32)
SET(CHECKCLI_SRCS
${CHECKCLI_SRCS}
cppcheck.rc
)
endif (WIN32)
# Libraries to link
2009-12-17 21:31:13 +01:00
set(CHECK_LIBS
checklib
)
# Windows needs additional shlwapi library
if (WIN32 AND NOT CYGWIN)
2009-12-17 21:31:13 +01:00
set(CHECK_LIBS
${CHECK_LIBS}
shlwapi
2009-12-17 21:31:13 +01:00
)
endif (WIN32 AND NOT CYGWIN)
include_directories (${CPPCHECK_SOURCE_DIR}/lib)
ADD_EXECUTABLE(cppcheck ${CHECKCLI_SRCS})
2009-12-17 21:31:13 +01:00
TARGET_LINK_LIBRARIES(cppcheck ${CHECK_LIBS})