[CMake] cmake with vscode

Stéphane Ancelot sancelot at numalliance.com
Tue Jan 22 08:43:48 EST 2019


Hi,

I have got some problems finding packages under windows platform.

I made a toolchain for VSCode and cmake 3.13 , but I don't understand 
why it fails to find almost all of my packages dependencies

It is not able to find packages in the CMAKE_FIND_ROOT_PATH itself.

If I try setting xx_LIBRARY and xx_INCLUDE_DIRS, if finds libs, but this 
does not sound the right Way .


Here is my toolchain :

# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)

message(STATUS "bin dir ${CMAKE_BINARY_DIR}")

# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH
${CMAKE_BINARY_DIR}\\WIN32DEPS\\xerces\\xerces-c-3.1.1-bin
${CMAKE_BINARY_DIR}\\WIN32DEPS\\JPEGLIB\\jpegsrc-9c
${CMAKE_BINARY_DIR}\\WIN32DEPS\\zlib-1.2.3-lib
${CMAKE_BINARY_DIR}\\WIN32DEPS\\libpng-1.2.37-lib
${CMAKE_BINARY_DIR}\\WIN32DEPS\\ftgl-binary
${CMAKE_BINARY_DIR}\\WIN32DEPS\\freetype-dev_2.4.2-1
${CMAKE_BINARY_DIR}\\WIN32DEPS\\iconv-1.9.2.1
                         ${CMAKE_BINARY_DIR}\\WIN32DEPS\\Python26
                         E:\\Qt\\5.9.5
                         )

# cmake 3.13
set(FREETYPE_LIBRARY E:\\freetype-windows-binaries-master\\lib)
set(FREETYPE_INCLUDE_DIRS E:\\freetype-windows-binaries-master\\include)

set(FTGL_LIBRARY ${CMAKE_BINARY_DIR}\\WIN32DEPS\\ftgl-binary\\lib)
set(FTGL_INCLUDE_DIRS ${CMAKE_BINARY_DIR}\\WIN32DEPS\\ftgl-binary\\include)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190122/d0d943e3/attachment.html>


More information about the CMake mailing list