CMake - cleaner way to set additional library for Windows.
This commit is contained in:
parent
69a98d81fc
commit
41eb141e61
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue