diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 10127b2ba..cfe7631e8 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -6,16 +6,17 @@ SET(CHECKCLI_SRCS main.cpp ) +# Libraries to link +set(CHECK_LIBS + checklib +) + # Windows needs additional shlwapi library if (WIN32 AND NOT CYGWIN) set(CHECK_LIBS - checklib + ${CHECK_LIBS} shlwapi ) -else (WIN32 AND NOT CYGWIN) -set(CHECK_LIBS - checklib -) endif (WIN32 AND NOT CYGWIN) include_directories (${CPPCHECK_SOURCE_DIR}/lib) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 59d8fe010..8f01ccb7b 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -75,16 +75,17 @@ SET(CHECK_TRANS SET(CHECK_RCCS gui.qrc) +# Libraries to link +set(CHECK_LIBS + checklib +) + # Windows needs additional shlwapi library if (WIN32 AND NOT CYGWIN) set(CHECK_LIBS - checklib + ${CHECK_LIBS} shlwapi ) -else (WIN32 AND NOT CYGWIN) -set(CHECK_LIBS - checklib -) endif (WIN32 AND NOT CYGWIN) # Generate rules for building source files from the resources diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ee46dfeb8..c78eec661 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -28,16 +28,17 @@ SET(CHECKTEST_SRCS testmathlib.cpp ) +# Libraries to link +set(CHECK_LIBS + checklib +) + # Windows needs additional shlwapi library if (WIN32 AND NOT CYGWIN) set(CHECK_LIBS - checklib + ${CHECK_LIBS} shlwapi ) -else (WIN32 AND NOT CYGWIN) -set(CHECK_LIBS - checklib -) endif (WIN32 AND NOT CYGWIN) include_directories (${CPPCHECK_SOURCE_DIR}/lib)