[CMake] CMake + NSIS on windows

Bill Hoffman bill.hoffman at kitware.com
Wed Jan 25 09:49:42 EST 2012


On 1/25/2012 9:28 AM, Andrea Crotti wrote:
> Since I still don't get CMake + NSIS running on Linux, I was trying to
> build my software
> on Windows...

CMake and NSIS has never been ported to work on Linux, so no surprise there.

>
> I installed CMake and NSIS and all my CMake actually does is to create
> an installer:
>
> cmake_minimum_required(VERSION 2.6)
> project(try_out)
> install(
> # is this automatically the source dir??
> DIRECTORY one two
> DESTINATION test_ddest
> COMPONENT dirs
> )
> include(CPack)
>
>
>  From my understanding I first need to run CMake which actually creates all
> the files which can be also read from cpack.
> Now the problem is that it complains the my C compiler is not set
> correctly.
>
> But why does it care in the first place?
> I mean there are no instructions there which might imply that it needs
> to compile
> something, so why should it be set?

The project command by default asks for c/c++ compiler.

You want:
project(NONE)


  cmake --help-command project

      Set a name for the entire project.

          project(<projectname> [languageName1 languageName2 ... ] )

     Sets the name of the project.  Additionally this sets the variables
        <projectName>_BINARY_DIR and <projectName>_SOURCE_DIR to the
        respective values.

   Optionally you can specify which languages your project supports.
   Example languages are CXX (i.e.  C++), C, Fortran, etc.  By default C
   and CXX are enabled.  E.g.  if you do not have a C++ compiler, you can
   disable the check for it by explicitly listing the languages you want
   to support, e.g.  C.  By using the special language "NONE" all checks
   for any language can be disabled.



>
> Thanks,
> Andrea
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573


More information about the CMake mailing list