cmake

cmake doesn't work in windows XP

I'm new with cmake,just installed it and following this article: http://www.cs.swarthmore.edu/~adanner/tips/cmake.php D:\Works\c\cmake\build>cmake .. -- Building for: NMake Makefiles CMake Warning at CMakeLists.txt:2 (project): To use the NMake generator, cmake must be run from a shell that can use the compiler cl from the command ...

How do I know if find_package() succeeds in cmake?

find_package(GTK) How can I make it output something so that I can know whether it finds something or not? Platform: windows XP ...

How do I make use of gtk with cmake under windows platform?

This is the FindGTK.cmake: # don't even bother under WIN32 IF(UNIX) ... ENDIF(UNIX) So it's not intended to work in windows at all,even though I've already installed the gtk+-bundle_2.20.0-20100406_win32 days ago. How should I properly use gtk with cmake now? ...

How does PATH environment affect my running executable from using msvcr90 to msvcr80 ???

#include <gtk/gtk.h> int main( int argc, char *argv[] ) { GtkWidget *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show (window); gtk_main (); return 0; } I tried putting various versions of MSVCR80.dll under the same directory as the generated executable(via cm...

C++ class is not being included properly.

Hello all, I have a problem which is either something I have completely failed to understand, or very strange. It's probably the first one, but I have spent the whole afternoon googling with no success, so here goes... I have a class called Schedule, which has as a member a vector of Room. However, when I compile using cmake, or even b...

How do I force cmake to link MSVCR.dll statically in windows XP?

Currently it's linking it dynamically,causing much trouble for me(missing msvcr80.dll). How should I instruct cmake to link it statically? ...

How do I use some specific dll in c/c++?

Like the msvcr70/msvcr80/msvcr90.dll, what's the code like to instruct the linker to link to one of them dynamically? Or has that anything to do with c/c++,but cmake? ...

How do I link gtk library more easily with cmake in windows?

I'm now doing it in a very ugly way by manually including all the required path(the gtk bundle is at D:/Tools/gtk+-bundle_2.20.0-20100406_win32): include_directories(D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/gtk-2.0 D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/glib-2.0 D:/Tools/gtk+-bundle_2.20.0-20100406_win32/lib/glib-2...

How to exclude source files from cmake created visual studio projects based on target architecture?

I have a Windows Driver Kit solution that builds the dll for a printer driver. I then convert the binary to C-code and include it into my source so that the dll can be extracted at run time and I don't have to distribute two files, just the .exe. However, I have to build the dll for i386 and amd64 resulting in two dlls, and thus two c ...

compile wxWidget on Snow Leopard

I just downloaded wxWidget source code on my snow leopard machine. The source code is the multiplatform one, so it contains windows and GTK components of wxWidget as well. I'd like to compile the wxWidget source code, but haven't found a good guide yet. This is my first step to create a multiplatform project, hopefully I would be able t...

What's the equivalent of gcc's -mwindows option in cmake?

I'm following the tuto: http://zetcode.com/tutorials/gtktutorial/firstprograms/ It works but each time I double click on the executable,there is a console which I don't want it there. How do I get rid of that console? I tried this: add_executable(Cmd WIN32 cmd.c) But got this fatal error: MSVCRTD.lib(crtexew.obj) : error LNK2019:...

How do I tell cmake not to create a console window?

I can achieve this by gcc : gcc -mwindows -o simple simple.c But only find this in cmake: add_executable(simple WIN32 simple.c) But it's not exactly the same as -mwindows, this will require the entry point to be WinMain, while gcc -mwindows doesn't require this(can be main). How should I do it properly? ...

How do I tell cmake to use Command line pattern?

Quoted from this answer: `pkg-config --cflags --libs gtk+-2.0` Suppose FindGTK2() is not working,but pkg-config --cflags --libs gtk+-2.0 is OK,how do I include requires lib/header files? ...

How do I tell cmake to do these two steps to use winpcap?

Quoted from here: If your program uses Win32 specific functions of WinPcap, remember to include WPCAP among the preprocessor definitions. If your program uses the remote capture capabilities of WinPcap, add HAVE_REMOTE among the preprocessor definitions. Do not include remote-ext.h directly in your source files. Has anyone managed t...

making conditions for linux and windows when linking libraries

Hello, Windows VC++ 2008 linux gcc 4.4.3 I have the following problem. When I compile on windows I need the ws2_32 library. However, when I compile on linux, I don't need to link this. My CMakeLists.txt INCLUDE_DIRECTORIES($CLIENT_SERVER_SOURCE_DIR/client) INCLUDE_DIRECTORIES($CLIENT_SERVER_SOURCE_DIR/cltsvr_ults) # Link the librar...

How do I merge zlib1.dll into my executable in C?

My executable needs zlib1.dll to run, and I need to keep them together now and then. How can I merge it into the executable to save the trouble? I'm using cmake to build the executable. UPDATE zlib1.dll is not directly included by my programe,but required by libpng14-14.dll(one dll of the gtk bundle) ...

cmake add_library at a custom location

I need to build a library that is to be placed at a custom location stored in the variable CUSTOM_OUTDIR. Currently, I am using the following code to make sure that the library is copied to its proper location. ADD_LIBRARY(example MODULE example.c) GET_TARGET_PROPERTY(FILEPATH example LOCATION) ADD_CUSTOM_COMMAND( TARGET example P...

cmake: Target-specific preprocessor definitions for CUDA targets seems not to work

I'm using cmake 2.8.1 on Mac OSX 10.6 with CUDA 3.0. So I added a CUDA target which needs BLOCK_SIZE set to some number in order to compile. cuda_add_executable(SimpleTestsCUDA SimpleTests.cu BlockMatrix.cpp Matrix.cpp ) set_target_properties(SimpleTestsCUDA PROPERTIES COMPI...

CMake module for gettext support?

Hello, Is there a good, open-source, documented CMake module for gettext support? I mean: Extracting messages from sources Merging messages to existing translations Compilation of mo-files Installation of mo-files. Because plain macros that CMake provides are quite... useless for real l10n support. Anybody? Edit: I created my own...

how to added framework to cmake

I have write a small helloworld program that needs cocoa framework. I'd like to know how to add framework in cmake. All the information I have found is out-of-date. I have cmake 2.8.1 on snow leopard. ...