Find Microsoft SDK (psapi.lib) with Cmake and or qmake

Posted by La Chamelle on Stack Overflow See other posts from Stack Overflow or by La Chamelle
Published on 2010-06-12T18:28:04Z Indexed on 2010/06/12 18:32 UTC
Read the original article Hit count: 378

Filed under:
|
|

Hello,

i have an application where is use Qt 4.6 and Microsoft SDKs (the Psapi.Lib).

I use cmake or qmake to build.

For qmake and cmake i specify in hard the path of the Psapi.lib.

qmake :

win32 {
    LIBS += "C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\Psapi.Lib"
}

cmake :

SET(PSAPI "C:/Program Files/Microsoft SDKs/Windows/v7.0A/Lib/Psapi.Lib")

But i want to avoid the hard path, is there is any way to search the SDK lib ?

For linux, there is no problem to search :

qmake :

unix {
    CONFIG += link_pkgconfig
    PKGCONFIG += xmu
}

cmake :

IF(UNIX)
  INCLUDE(FindPkgConfig)
  PKG_CHECK_MODULES(XMU xmu REQUIRED)
  INCLUDE_DIRECTORIES(${XMU_INCLUDE_DIR})
  LINK_DIRECTORIES(${XMU_LIBRARY_DIRS})
ENDIF()

It's possible to make the same ? Thanks you.

© Stack Overflow or respective owner

Related posts about c++

Related posts about cmake