[CMake] The find_xxx family and VS

Micha Renner Micha.Renner at t-online.de
Tue Jun 15 11:29:58 EDT 2010


Am Dienstag, den 15.06.2010, 14:12 +0200 schrieb Micha Renner:
> It seems, that CMake can detect the MSVC specific headers and libraries
> only, if it runs within Visual Studio.
> 
> For example:
> FIND_FILE(STD_FILE stdio.h),
> FIND_PATH(STD_PATH stdio.h) or
> FIND_LIBRARY(LIB_PATH comctl32)
> 
> results in "NOT-FOUND", if CMake is run outside the IDE with an empty
> Build-Directory. 
> 
> This means the first run of the compiler/linker always fails, since
> CMake regenerates the solution-/config-files only if there is a change
> in the script/config files inside VS.
> 
> This always leads to complex instructions for third-party users who just
> want to build the programs/libraries, like this.
> "After you have build the solution files with cmake-gui:
> - open VS, 
> - open the project
> - open the "Top-level"-CMakeList.txt file
> - Hit a space in an empty line
> - Rebuild the project.
> 
> Is there a better foolproof method to solve this.
cmake-2.8.2-rc1, a very good solution. Just in time, thanks

Micha



More information about the CMake mailing list