CMake - cleaner way to set additional library for Windows.

This commit is contained in:
Kimmo Varis 2009-12-19 16:21:46 +02:00
parent 69a98d81fc
commit 41eb141e61
3 changed files with 18 additions and 15 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)