[CMake] CMake newbie...

Philip Lowman philip at yhbt.com
Tue Jul 1 22:50:40 EDT 2008


On Sat, Jun 28, 2008 at 5:34 AM, Georgios Petasis <petasisg at yahoo.gr> wrote:

> Hi all,
>
> I am a totally CMake newbie :-) However, I have spend some time (~3 days)
> in porting one application of mine from autoconf/make to cmake. The port was
> somewhat easy, and for the time being I have tested the build system under
> windows only with VC++ 9.0. As a result of this process I have collected a
> set of questions that I couldn't managed to find answers :-)
>
> 1) Is it possible to know about 32/64 bit build?
> If I use the "Visual Studio 9 2008" generator, I get a win32 build.
> Similarly, If I use the "Visual Studio 9 2008 Win64" generator, I get an
> 64-bit build. Is there a cmake variable that can tell me if it is a 32/64
> build, in order to install generated
> libraries differently? It would be great if I can find a solution that will
> work under at least windows & linux.


I believe you could use the value of CMAKE_SIZEOF_VOID_P and MSVC to perform
32/64-bit specific logic.

 2) Is it possible to install only a dll, and skip the .lib file?
> Usually, when a dll gets installed, the associated lib is also installed. I
> usually write this command for installing shared libraries:
> INSTALL ( TARGETS ${TkHtml_NAME}
>         RUNTIME DESTINATION CDM/${CMAKE_SYSTEM_NAME}
>         LIBRARY DESTINATION CDM/${CMAKE_SYSTEM_NAME}
>         ARCHIVE DESTINATION CDM/${CMAKE_SYSTEM_NAME} )
> Can somehow "skip" this "ARCHIVE" installation?


On CMake 2.4.x and 2.6.x the ARCHIVE component of the install command
controls the installation of import libraries on Windows.  Simply remove the
ARCHIVE DESTINATION CDM/${CMAKE_SYSTEM_NAME} from your above code and the
.lib files will no longer be installed.


> 3) In CPack (NSIS generator), is it possible to define an additional MUI
> language?
> Is there a variable for adding additional languages?
> Or is it possible to add "!insertmacro MUI_LANGUAGE "some_language""
> somehow?
>
> 4) In CPack, is it possible to install something other than exe?
> The command I tried is:
> SET ( CPACK_PACKAGE_EXECUTABLES ellogon.tcl;Ellogon )
> This creates the shortcut to run my application (which is a Tcl/Tk one),
> but in the project.nsi I get the following:
> CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Ellogon.lnk"
> "$INSTDIR\bin\ellogon.tcl.exe"
>
> CPack has added a "bin" directory before it, and an .exe extension. In my
> original NSIS script, I had something like:
> CreateShortCut "$SMPROGRAMS\Ellogon\Ellogon ${PRODUCT_VERSION}.lnk" \
>                '"$INSTDIR\ellogon.tcl"' "" \
>                "$INSTDIR\CDM\Windows\libCDM.dll" "6"
> Can something similar be achieved with CPack?


Not sure on these two questions.

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080701/f2b531f4/attachment.htm>


More information about the CMake mailing list