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
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Libraries to link
|
||||||
|
set(CHECK_LIBS
|
||||||
|
checklib
|
||||||
|
)
|
||||||
|
|
||||||
# Windows needs additional shlwapi library
|
# Windows needs additional shlwapi library
|
||||||
if (WIN32 AND NOT CYGWIN)
|
if (WIN32 AND NOT CYGWIN)
|
||||||
set(CHECK_LIBS
|
set(CHECK_LIBS
|
||||||
checklib
|
${CHECK_LIBS}
|
||||||
shlwapi
|
shlwapi
|
||||||
)
|
)
|
||||||
else (WIN32 AND NOT CYGWIN)
|
|
||||||
set(CHECK_LIBS
|
|
||||||
checklib
|
|
||||||
)
|
|
||||||
endif (WIN32 AND NOT CYGWIN)
|
endif (WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
include_directories (${CPPCHECK_SOURCE_DIR}/lib)
|
include_directories (${CPPCHECK_SOURCE_DIR}/lib)
|
||||||
|
@ -75,16 +75,17 @@ SET(CHECK_TRANS
|
|||||||
|
|
||||||
SET(CHECK_RCCS gui.qrc)
|
SET(CHECK_RCCS gui.qrc)
|
||||||
|
|
||||||
|
# Libraries to link
|
||||||
|
set(CHECK_LIBS
|
||||||
|
checklib
|
||||||
|
)
|
||||||
|
|
||||||
# Windows needs additional shlwapi library
|
# Windows needs additional shlwapi library
|
||||||
if (WIN32 AND NOT CYGWIN)
|
if (WIN32 AND NOT CYGWIN)
|
||||||
set(CHECK_LIBS
|
set(CHECK_LIBS
|
||||||
checklib
|
${CHECK_LIBS}
|
||||||
shlwapi
|
shlwapi
|
||||||
)
|
)
|
||||||
else (WIN32 AND NOT CYGWIN)
|
|
||||||
set(CHECK_LIBS
|
|
||||||
checklib
|
|
||||||
)
|
|
||||||
endif (WIN32 AND NOT CYGWIN)
|
endif (WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
# Generate rules for building source files from the resources
|
# Generate rules for building source files from the resources
|
||||||
|
@ -28,16 +28,17 @@ SET(CHECKTEST_SRCS
|
|||||||
testmathlib.cpp
|
testmathlib.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Libraries to link
|
||||||
|
set(CHECK_LIBS
|
||||||
|
checklib
|
||||||
|
)
|
||||||
|
|
||||||
# Windows needs additional shlwapi library
|
# Windows needs additional shlwapi library
|
||||||
if (WIN32 AND NOT CYGWIN)
|
if (WIN32 AND NOT CYGWIN)
|
||||||
set(CHECK_LIBS
|
set(CHECK_LIBS
|
||||||
checklib
|
${CHECK_LIBS}
|
||||||
shlwapi
|
shlwapi
|
||||||
)
|
)
|
||||||
else (WIN32 AND NOT CYGWIN)
|
|
||||||
set(CHECK_LIBS
|
|
||||||
checklib
|
|
||||||
)
|
|
||||||
endif (WIN32 AND NOT CYGWIN)
|
endif (WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
include_directories (${CPPCHECK_SOURCE_DIR}/lib)
|
include_directories (${CPPCHECK_SOURCE_DIR}/lib)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user