[CMake] CMake 3.0.1 - avast Win32;Dropper-gen

2014-08-17 Thread Georgios Petasis

Hi all,

I installed the latest cmake under windows, and avast keeps telling me 
cmake.exe has a virus.

The detected virus is Win32:Dropper-gen.

Avast finds it in cmake.exe, inside both the windows zip file, and the 
setup file.


Is it really a virus, or a false alarm?

George
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] How to locate GTK3?

2012-07-22 Thread Georgios Petasis

Hi all,

Is there support for GTK3? I am using cmake 2.8.8.

Regards,

George
--

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


[CMake] How to pass a flag to be used by cmake?

2012-07-09 Thread Georgios Petasis

Hi all,

I want to build 32-bit binaries on a 64-bit Linux system, with gcc.
In projects that use configure, this is easy:

export CFLAGS=-m32

But how can I do the same with cmake projects?

cmake does not seem to use CFLAGS. Is there a variable I can define when 
I run cmake, to pass the -m32 flag to gcc?


George
--

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


Re: [CMake] Cross-compilation & Find_Package(Tcl)...

2012-06-26 Thread Georgios Petasis

Στις 26/6/2012 18:22, ο/η Georgios Petasis έγραψε:

Στις 26/6/2012 17:56, ο/η Georgios Petasis έγραψε:

Hi all,

I am trying to cross-compile an application for windows, in a Fedora 
17 box.

I have successfully cross-compiled/installed Tcl/Tk from sources.
And I want to also cross-compile my application, which uses cmake.

Is there a way to convince cmake to use the platform tclsh (in order 
to run some scripts), but find the includes & libraries that I have 
cross-compiled for the platform?


Running cmake from the Fedora wrapper "mingw32-cmake" does not work. 
I also tried to set the following variables:


CMAKE_PREFIX_PATH=/opt/ActiveTcl-8.6
CMAKE_INCLUDE_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/include 


CMAKE_LIBRARY_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/lib
CMAKE_PROGRAM_PATH=/opt/ActiveTcl-8.6/bin

But I always get the following:

-- Found Tclsh: /opt/ActiveTcl-8.6/bin/tclsh (found version "8.6")
CMake Error at 
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 
(MESSAGE):

  Could NOT find TCL (missing: TCL_LIBRARY TCL_INCLUDE_PATH)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:288 
(_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindTCL.cmake:206 
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)

  CMakeLists.txt:122 (FIND_PACKAGE)


Any ideas?

George

I have managed to proceed a little bit further, with the following 
commands:


echo "CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH"
echo "CMAKE_INCLUDE_PATH=$CMAKE_INCLUDE_PATH"
echo "CMAKE_LIBRARY_PATH=$CMAKE_LIBRARY_PATH"
echo "CMAKE_PROGRAM_PATH=$CMAKE_PROGRAM_PATH"
mingw32-cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE \
  -D PKG_OS_ARCH=$ARCH -D CMAKE_INSTALL_PREFIX=$PREFIX \
  -D TCL_INCLUDE_PATH=$CMAKE_INCLUDE_PATH \
  -D TK_INCLUDE_PATH=$CMAKE_INCLUDE_PATH \
  -D TCL_LIBRARY=$CMAKE_LIBRARY_PATH \
  -D TK_LIBRARY=$CMAKE_LIBRARY_PATH ...

Which gave as output:

CMAKE_PREFIX_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/
CMAKE_INCLUDE_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/include 


CMAKE_LIBRARY_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/lib
CMAKE_PROGRAM_PATH=/opt/ActiveTcl-8.6/bin
...
CMake Error: The following variables are used in this project, but 
they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the 
CMake files:

TCL_STUB_LIBRARY (ADVANCED)


How to help cmake to define the stubs library path?
Looking inside the /free/cross-compilation-binaries/win32-ix86/tcl/lib 
folder, the stubs library is named "libtclstub86.a"


George


Finally, defining all the variables myself, seems to solve the problem:

mingw32-cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE \
  -D PKG_OS_ARCH=$ARCH -D CMAKE_INSTALL_PREFIX=$PREFIX \
  -D TCL_INCLUDE_PATH=$TCL_INCLUDE_PATH \
  -D TK_INCLUDE_PATH=$TCL_INCLUDE_PATH \
  -D TCL_LIBRARY=$TCL_LIB_PATH/libtcl${TCL_VERSION}.a \
  -D TK_LIBRARY=$TCL_LIB_PATH/libtk${TCL_VERSION}.a \
  -D 
TCL_STUB_LIBRARY=$TCL_LIB_PATH/libtclstub${TCL_VERSION}.a \
  -D 
TK_STUB_LIBRARY=$TCL_LIB_PATH/libtkstub${TCL_VERSION}.a ...


Now I have only to check what the output of the compiler is... :-)

George
--

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

Re: [CMake] Cross-compilation & Find_Package(Tcl)...

2012-06-26 Thread Georgios Petasis

Στις 26/6/2012 17:56, ο/η Georgios Petasis έγραψε:

Hi all,

I am trying to cross-compile an application for windows, in a Fedora 
17 box.

I have successfully cross-compiled/installed Tcl/Tk from sources.
And I want to also cross-compile my application, which uses cmake.

Is there a way to convince cmake to use the platform tclsh (in order 
to run some scripts), but find the includes & libraries that I have 
cross-compiled for the platform?


Running cmake from the Fedora wrapper "mingw32-cmake" does not work. I 
also tried to set the following variables:


CMAKE_PREFIX_PATH=/opt/ActiveTcl-8.6
CMAKE_INCLUDE_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/include 


CMAKE_LIBRARY_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/lib
CMAKE_PROGRAM_PATH=/opt/ActiveTcl-8.6/bin

But I always get the following:

-- Found Tclsh: /opt/ActiveTcl-8.6/bin/tclsh (found version "8.6")
CMake Error at 
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 
(MESSAGE):

  Could NOT find TCL (missing: TCL_LIBRARY TCL_INCLUDE_PATH)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:288 
(_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindTCL.cmake:206 
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)

  CMakeLists.txt:122 (FIND_PACKAGE)


Any ideas?

George


I have managed to proceed a little bit further, with the following commands:

echo "CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH"
echo "CMAKE_INCLUDE_PATH=$CMAKE_INCLUDE_PATH"
echo "CMAKE_LIBRARY_PATH=$CMAKE_LIBRARY_PATH"
echo "CMAKE_PROGRAM_PATH=$CMAKE_PROGRAM_PATH"
mingw32-cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE \
  -D PKG_OS_ARCH=$ARCH -D CMAKE_INSTALL_PREFIX=$PREFIX \
  -D TCL_INCLUDE_PATH=$CMAKE_INCLUDE_PATH \
  -D TK_INCLUDE_PATH=$CMAKE_INCLUDE_PATH \
  -D TCL_LIBRARY=$CMAKE_LIBRARY_PATH \
  -D TK_LIBRARY=$CMAKE_LIBRARY_PATH ...

Which gave as output:

CMAKE_PREFIX_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/
CMAKE_INCLUDE_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/include
CMAKE_LIBRARY_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/lib
CMAKE_PROGRAM_PATH=/opt/ActiveTcl-8.6/bin
...
CMake Error: The following variables are used in this project, but they 
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the 
CMake files:

TCL_STUB_LIBRARY (ADVANCED)


How to help cmake to define the stubs library path?
Looking inside the /free/cross-compilation-binaries/win32-ix86/tcl/lib 
folder, the stubs library is named "libtclstub86.a"


George


--

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

[CMake] Cross-compilation & Find_Package(Tcl)...

2012-06-26 Thread Georgios Petasis

Hi all,

I am trying to cross-compile an application for windows, in a Fedora 17 box.
I have successfully cross-compiled/installed Tcl/Tk from sources.
And I want to also cross-compile my application, which uses cmake.

Is there a way to convince cmake to use the platform tclsh (in order to 
run some scripts), but find the includes & libraries that I have 
cross-compiled for the platform?


Running cmake from the Fedora wrapper "mingw32-cmake" does not work. I 
also tried to set the following variables:


CMAKE_PREFIX_PATH=/opt/ActiveTcl-8.6
CMAKE_INCLUDE_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/include
CMAKE_LIBRARY_PATH=/free/cross-compilation-binaries/win32-ix86/tcl/lib
CMAKE_PROGRAM_PATH=/opt/ActiveTcl-8.6/bin

But I always get the following:

-- Found Tclsh: /opt/ActiveTcl-8.6/bin/tclsh (found version "8.6")
CMake Error at 
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):

  Could NOT find TCL (missing: TCL_LIBRARY TCL_INCLUDE_PATH)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:288 
(_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindTCL.cmake:206 
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)

  CMakeLists.txt:122 (FIND_PACKAGE)


Any ideas?

George
--

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


[CMake] How to convince cmake to find Tcl/Tk 8.6?

2012-06-22 Thread Georgios Petasis

Hi all,

I am using cmake 2.8.8 under Fedora 17 64 bit, in which I have installed 
ActiveTcl 8.6 in /opt.

My path variable starts with:

/opt/ActiveTcl-8.6/bin:...

And when I run tclsh/tclsh8.6/wish/wish8.6, I get the ActiveTcl one, 
from /opt.


However, cmake does not find this Tcl/Tk installation, and locates 
instead Tcl 8.5 installed in /usr.
(Which cannot be used for compilation, since the application depends on 
8.6 features).


How can I convince cmake to pick up the 8.6 version installed in 
/opt/ActiveTcl-8.6/ ?


George
--

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


Re: [CMake] Finding X11 fails under OS X...

2009-09-02 Thread Georgios Petasis



O/H Martin Costabel έγραψε:

Georgios Petasis wrote:


Hi all,

I am trying to compile something that uses X under OS X 10.5.5, but
cmake is unable to locate the X11 libraries.
The include path is located. The failure is while detecting libraries.
For example. libX11 exists in /usr/X11/lib/libX11.6.dylib. Cmake does
not find this library, as it expects to find "libX11.dylib".
There is a libX11.la file from libtool, but is not used during search. I
suppose if the libX11.la was parsed, then the library libX11.6.dylib
would have been found.

Any ideas on how can I persuade cmake to locate the X11 libraries?


If you don't have /usr/X11/lib/libX11.dylib (which is a symbolic link 
to libX11.6.dylib), then your X11 installation is incomplete. You must 
have removed this symlink accidentally. Or maybe you can blame it on 
Apple's installer which is known to occasionally forget files.


No I don't. In fact there is only a .la file all X11 libraries, besides 
the version-coded .dylib files. The only places that there .dylib files 
without version (along with the versioned ones) is inside the SDK 
folders, which are not considered at all by cmake.


What is the suggested way? Reinstall X-code to get the missing files?

George
___
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

[CMake] Finding X11 fails under OS X...

2009-09-02 Thread Georgios Petasis

Hi all,

I am trying to compile something that uses X under OS X 10.5.5, but
cmake is unable to locate the X11 libraries.
The include path is located. The failure is while detecting libraries.
For example. libX11 exists in /usr/X11/lib/libX11.6.dylib. Cmake does
not find this library, as it expects to find "libX11.dylib".
There is a libX11.la file from libtool, but is not used during search. I
suppose if the libX11.la was parsed, then the library libX11.6.dylib
would have been found.

Any ideas on how can I persuade cmake to locate the X11 libraries?

Regards,

George


___
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


[CMake] Update in FindTclStub.cmake

2008-08-04 Thread Georgios Petasis

Hi all,

Recent versions of Tcl/Tk have added a new stubs library for the themed 
widget set.

I have updated FindTclStub.cmake to also locate this library.

George
# - Find Tcl stub libraries.
# This module finds Tcl stub libraries. It first finds Tcl include files and
# libraries by calling FindTCL.cmake.
# How to Use the Tcl Stubs Library:
#   http://tcl.activestate.com/doc/howto/stubs.html
# Using Stub Libraries:
#   http://safari.oreilly.com/0130385603/ch48lev1sec3
# This code sets the following variables:
#  TCL_STUB_LIBRARY   = path to Tcl stub library
#  TK_STUB_LIBRARY= path to Tk stub library
#
# In an effort to remove some clutter and clear up some issues for people
# who are not necessarily Tcl/Tk gurus/developpers, some variables were
# moved or removed. Changes compared to CMake 2.4 are:
# - TCL_STUB_LIBRARY_DEBUG and TK_STUB_LIBRARY_DEBUG were removed.
#   => these libs are not packaged by default with Tcl/Tk distributions. 
#  Even when Tcl/Tk is built from source, several flavors of debug libs
#  are created and there is no real reason to pick a single one
#  specifically (say, amongst tclstub84g, tclstub84gs, or tclstub84sgx). 
#  Let's leave that choice to the user by allowing him to assign 
#  TCL_STUB_LIBRARY to any Tcl library, debug or not.

INCLUDE(FindTCL)

GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
STRING(REGEX REPLACE 
  "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")

GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH)
GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
STRING(REGEX REPLACE 
  "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}")

GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)

GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
STRING(REGEX REPLACE 
  "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}")

GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
STRING(REGEX REPLACE 
  "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}")

SET(TCLTK_POSSIBLE_LIB_PATHS
  "${TCL_INCLUDE_PATH_PARENT}/lib"
  "${TK_INCLUDE_PATH_PARENT}/lib"
  "${TCL_LIBRARY_PATH}"
  "${TK_LIBRARY_PATH}"
  "${TCL_TCLSH_PATH_PARENT}/lib"
  "${TK_WISH_PATH_PARENT}/lib"
  /usr/lib 
  /usr/local/lib
)

IF(WIN32)
  GET_FILENAME_COMPONENT(
ActiveTcl_CurrentVersion 
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" 
NAME)
  SET(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS}

"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib"
"$ENV{ProgramFiles}/Tcl/Lib"
"C:/Program Files/Tcl/lib" 
"C:/Tcl/lib" 
)
ENDIF(WIN32)

FIND_LIBRARY(TCL_STUB_LIBRARY
  NAMES 
  tclstub 
  tclstub${TK_LIBRARY_VERSION} tclstub${TCL_TCLSH_VERSION} 
tclstub${TK_WISH_VERSION}
  tclstub86 tclstub8.6
  tclstub85 tclstub8.5 
  tclstub84 tclstub8.4 
  tclstub83 tclstub8.3 
  tclstub82 tclstub8.2 
  tclstub80 tclstub8.0
  PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)

FIND_LIBRARY(TK_STUB_LIBRARY 
  NAMES 
  tkstub 
  tkstub${TCL_LIBRARY_VERSION} tkstub${TCL_TCLSH_VERSION} 
tkstub${TK_WISH_VERSION}
  tkstub86 tkstub8.6
  tkstub85 tkstub8.5 
  tkstub84 tkstub8.4 
  tkstub83 tkstub8.3 
  tkstub82 tkstub8.2 
  tkstub80 tkstub8.0
  PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)

FIND_LIBRARY(TTK_STUB_LIBRARY 
  NAMES 
  ttkstub 
  ttkstub${TCL_LIBRARY_VERSION} ttkstub${TCL_TCLSH_VERSION} 
ttkstub${TK_WISH_VERSION}
  ttkstub86 ttkstub8.6
  ttkstub85 ttkstub8.5 
  ttkstub84 ttkstub8.4 
  ttkstub83 ttkstub8.3 
  ttkstub82 ttkstub8.2 
  ttkstub80 ttkstub8.0
  PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)

MARK_AS_ADVANCED(
  TCL_STUB_LIBRARY
  TK_STUB_LIBRARY
  TTK_STUB_LIBRARY
  )
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] FindGTK fails?

2008-08-04 Thread Georgios Petasis

Hi all,

I tried to use cmake 2.7 to compile a gnome application under Fedora 9, 
and I got a failure.
It seems that "FindGTK.cmake" from the modules directory is severe 
outdated, looking for gtk 1.2, in a format used a few years ago. Can 
somebody please update this script to be more "recent"?


I have done an initial attempt, and extended the original module to 
cover fedora but also windows. I have not removed anything (so my 
version will still do what the original did) but I have added some more 
include paths/libraries.

Also, GTK nowadays works also under windows.
I have attached my modified version. Can somebody please revise it and 
add it to the next cmake release?


George
# - try to find GTK (and glib) and GTKGLArea
#  GTK_INCLUDE_DIR   - Directories to include to use GTK
#  GTK_LIBRARIES - Files to link against to use GTK
#  GTK_FOUND - GTK was found
#  GTK_GL_FOUND  - GTK's GL features were found

SET ( GTK_BUNDLE_DIR_WIN "C:/Program Files (x86)/gtk+-bundle-2.12.11" )
SET ( GTK_WIN_INCLUDE_DIR ${GTK_BUNDLE_DIR_WIN}/include )
SET ( GTK_WIN_LIBRARY_DIR ${GTK_BUNDLE_DIR_WIN}/lib )

# don't even bother under WIN32
#IF(UNIX)

  FIND_PATH( GTK_gtk_INCLUDE_PATH NAMES gtk/gtk.h
PATH_SUFFIXES gtk-2.0 gtk-1.2 gtk20 gtk12
PATHS
/usr/include
/usr/include/gtk-2.0
/usr/openwin/share/include
/usr/openwin/include
/opt/gnome/include
${GTK_WIN_INCLUDE_DIR}
  )

  FIND_PATH( GTK_gdk_INCLUDE_PATH NAMES gdkconfig.h
PATH_SUFFIXES gtk-2.0 gtk-1.2 gtk20 gtk12
PATHS
/usr/lib/gtk-2.0/include/
/usr/include
/usr/include/gtk-2.0
/usr/openwin/share/include
/usr/openwin/include
/opt/gnome/include
${GTK_WIN_LIBRARY_DIR}/gtk-2.0/include
  )

  # Some Linux distributions (e.g. Red Hat) have glibconfig.h
  # and glib.h in different directories, so we need to look
  # for both.
  #  - Atanas Georgiev <[EMAIL PROTECTED]>

  FIND_PATH( GTK_glibconfig_INCLUDE_PATH NAMES glibconfig.h
PATHS
/usr/lib/glib-2.0/include
/usr/openwin/share/include
/usr/local/include/glib12
/usr/lib/glib/include
/usr/local/lib/glib/include
/opt/gnome/include
/opt/gnome/lib/glib/include
${GTK_WIN_LIBRARY_DIR}/glib-2.0/include
  )

  FIND_PATH( GTK_glib_INCLUDE_PATH NAMES glib.h
PATH_SUFFIXES gtk-2.0 glib-2.0 gtk-1.2 glib-1.2 glib20 glib12
PATHS
/usr/include
/usr/openwin/share/include
/usr/lib/glib/include
/opt/gnome/include
${GTK_WIN_INCLUDE_DIR}
  )

  FIND_PATH( GTK_gtkgl_INCLUDE_PATH NAMES gtkgl/gtkglarea.h
PATHS /usr/openwin/share/include
  /opt/gnome/include
${GTK_WIN_INCLUDE_DIR}
  )

  FIND_PATH( GTK_cairo_INCLUDE_PATH NAMES cairo.h
PATH_SUFFIXES cairo
PATHS
/usr/include
/usr/include/gtk-2.0
/usr/openwin/share/include
/usr/openwin/include
/opt/gnome/include
${GTK_WIN_INCLUDE_DIR}
  )

  FIND_PATH( GTK_pango_INCLUDE_PATH NAMES pango/pango.h
PATH_SUFFIXES pango pango-1.0
PATHS
/usr/include
/usr/include/gtk-2.0
/usr/openwin/share/include
/usr/openwin/include
/opt/gnome/include
${GTK_WIN_INCLUDE_DIR}
  )

  FIND_PATH( GTK_atk_INCLUDE_PATH NAMES atk/atkobject.h
PATH_SUFFIXES atk atk-1.0
PATHS
/usr/include
/usr/include/gtk-2.0
/usr/openwin/share/include
/usr/openwin/include
/opt/gnome/include
${GTK_WIN_INCLUDE_DIR}
  )

  FIND_LIBRARY( GTK_gtkgl_LIBRARY gtkgl
/usr/openwin/lib
/opt/gnome/lib
/usr/lib
${GTK_WIN_LIBRARY_DIR}
  )

  #
  # The 12 suffix is thanks to the FreeBSD ports collection
  #

  FIND_LIBRARY( GTK_gtk_LIBRARY
NAMES gtk-x11-2.0 gtk-win32-2.0 gtk-2.0 gtk20 gtk-win32
  gtk-x11-1.2 gtk-win32-1.2 gtk-1.2 gtk12 gtk-x11 gtk
PATHS /usr/openwin/lib
  /opt/gnome/lib
  /usr/lib
${GTK_WIN_LIBRARY_DIR}
  )

  FIND_LIBRARY( GTK_gdk_LIBRARY
NAMES  gdk-x11-2.0 gdk-win32-2.0 gdk-2.0 gdk20 gdk-win32
   gdk-x11-1.2 gdk-win32-1.2 gdk-1.2 gdk12 gdk-x11 gdk
PATHS  /usr/openwin/lib
   /opt/gnome/lib
   /usr/lib
${GTK_WIN_LIBRARY_DIR}
  )

  FIND_LIBRARY( GTK_gmodule_LIBRARY
NAMES  gmodule-2.0 gmodule20 gmodule-1.2 gmodule12 gmodule
PATHS  /usr/openwin/lib
   /opt/gnome/lib
   /usr/lib
${GTK_WIN_LIBRARY_DIR}
  )

  FIND_LIBRARY( GTK_gobject_LIBRARY
NAMES  gobject-2.0 gobject20 gobject-1.2 gobject12 gobject
PATHS  /usr/openwin/lib
   /opt/gnome/lib
   /usr/lib
${GTK_WIN_LIBRARY_DIR}
  )

  FIND_LIBRARY( GTK_glib_LIBRARY
NAMES  glib-2.0 glib20 glib-1.2 glib12 glib
PATHS  /usr/openwin/lib
   /opt/gnome/lib
   /usr/lib
${GTK_WIN_LIBRARY_DIR}
  )

  FIND_LIBRARY( GTK_Xi_LIBRARY 
NAMES Xi 
PATHS /usr/openwin/lib 
  /opt/gnome/lib 
  /usr/lib
${GTK_WIN_LIBRARY_DIR}
) 

  FIND_LIBRARY( GTK_gthread_LIBRARY
NAMES  gthread-2.0 gthread20 gthread-1.2 gthread12 gthread
PATHS  /usr/openwin/lib
   /opt/gn

[CMake] Can I change the extension of a dll?

2008-07-10 Thread Georgios Petasis

Hi all,

I am trying to compile a python module with cmake. Unfortunately, in 
python 2.5.2 they have decided that
C modules will use the extension .pyd, instead of .dll under windows. 
So, I have to somehow rename

a dll during installation. I currenlty have code like:

INSTALL ( TARGETS ${PythonCDM_NAME_V}
 RUNTIME DESTINATION
   ${PKG_HOME_DIR}/CDM/Python/${CMAKE_SYSTEM_NAME}/${PKG_OS_ARCH}
 LIBRARY DESTINATION
   ${PKG_HOME_DIR}/CDM/Python/${CMAKE_SYSTEM_NAME}/${PKG_OS_ARCH} )

as I don't want .lib to be installed. Is there a way I can rename the 
dll to have a .pyd extension?


George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Rpath removed from installed libraries?

2008-07-10 Thread Georgios Petasis

O/H Alexander Neundorf ??:

On Wednesday 09 July 2008, Georgios Petasis wrote:
  

O/H Alexander Neundorf ??:


...
  

Which dirs are that exactly ?
Are they all outside the build dir ?

Alex
  

Two are in the build dir, but one is the perl library, in
/usr/lib/perl5/



I think that one should stay...
Could you try to additionally link to any library e.g. in /opt/lib and see if 
this dir is also removed when installing ?


Can you please have a look (or post) the cmake_install.cmake from the dir 
where the library is built ?

There must be a line which contains "RPATH".

Which distribution do you use ?
Can you also post the library from the build dir, which still contains the 
RPATH (or send it to me directly) ? Is that possible or is it secret ? If so, 
can you create a testcase which shows the problem ?


Alex

  

Dear Alex,

I will try to make a test case for both problems I am having with this 
piece of code as soon as possible :-)

Do I have to put it anywhere specific, or attach it to an e-mail?

George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Rpath removed from installed libraries?

2008-07-09 Thread Georgios Petasis

O/H Alexander Neundorf ??:

On Wednesday 09 July 2008, Georgios Petasis wrote:
  

O/H Alexander Neundorf ??:


On Wednesday 09 July 2008, George Petasis wrote:
  

Hi all,

I am trying to build a shared library under linux, with
INSTALL_RPATH_USE_LINK_PATH ON. When the library is built,
-Wl,-rpath,... is added to the compiler flags. Also, I can see the rpath
of the built with "readelf -d".
But the installed shared library has no rpath, and "readelf -d" does not
show any rpath. Why is rpath information removed during installation?
How can I avoid this?


cmake 2.4 or 2.6 ?
They handle this differently. In 2.4 the executable is linked again with
the new RPATH, in 2.6 the new RPATH is patched into the existing
executable. What is thre RPATH of the not-installed executable ?

Alex
  

Dear Alex,

I am using cmake 2.6-patch0. And my target is a shared library, not an
executable.
The RPATH of the non-installed .so file contains 3 directories,
separated with ":".
The installed one has no RPATH section, when examined with readelf. 



Which dirs are that exactly ?
Are they all outside the build dir ?

Alex
  
Two are in the build dir, but one is the perl library, in 
/usr/lib/perl5/


George

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Rpath removed from installed libraries?

2008-07-09 Thread Georgios Petasis

O/H Alexander Neundorf ??:

On Wednesday 09 July 2008, George Petasis wrote:
  

Hi all,

I am trying to build a shared library under linux, with
INSTALL_RPATH_USE_LINK_PATH ON. When the library is built, -Wl,-rpath,...
is added to the compiler flags. Also, I can see the rpath of the built with
"readelf -d".
But the installed shared library has no rpath, and "readelf -d" does not
show any rpath. Why is rpath information removed during installation?
How can I avoid this?



cmake 2.4 or 2.6 ?
They handle this differently. In 2.4 the executable is linked again with the 
new RPATH, in 2.6 the new RPATH is patched into the existing executable.

What is thre RPATH of the not-installed executable ?

Alex

Dear Alex,

I am using cmake 2.6-patch0. And my target is a shared library, not an 
executable.
The RPATH of the non-installed .so file contains 3 directories, 
separated with ":".
The installed one has no RPATH section, when examined with readelf. And 
of course does not work, unless tweaking LD_LIBRARY_PATH.


George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Compiling java files to classes then creating a jar

2008-07-07 Thread Georgios Petasis

O/H Gerrick Bivins ??:

Hello,
Another newbie question, I think I know how to create .java files from 
swig using Cmake and I think I know how to create a jar file from 
.class BUT
I'm not sure how to call the java compiler (javac) on each .java file 
to create my .class files. For starters, how would I loop over the 
*.java files in a given directory?
Does, FOREACH support this? I'm unable to find much info on it in the 
"Mastering Cmake" book.

Gerrick

Dear Gerrick,

I am not sure if this is the correct answer (I am also a newbie :-) ), 
but I have added these commands to my CMakeLists.txt:


IF ( ENABLE_JAVA_SUPPORT )
   MESSAGE ( STATUS "Searching for Java..." )
   FIND_PACKAGE ( Java )
   FIND_PACKAGE ( JNI )
ENDIF ( ENABLE_JAVA_SUPPORT )
IF ( JAVA_COMPILE )
 MESSAGE ( STATUS " ===" )
 MESSAGE ( STATUS "  Java" )
 MESSAGE ( STATUS " ===" )
 ## 
=

 ##  Get Java version...
 ## 
=

 EXECUTE_PROCESS ( COMMAND ${JAVA_COMPILE} -version
   OUTPUT_VARIABLE JAVA_OUTPUT
   ERROR_VARIABLE  JAVA_ERROR_OUTPUT
   RESULT_VARIABLE JAVA_RETURN_VALUE )
 IF ( NOT JAVA_RETURN_VALUE )
   STRING ( REGEX MATCH [0-9._]+ JAVA_VERSION ${JAVA_ERROR_OUTPUT} )
 ENDIF ( NOT JAVA_RETURN_VALUE )

 GET_FILENAME_COMPONENT (JAVA_BIN_PATH "${JAVA_COMPILE}" PATH)
 FIND_PROGRAM ( JAVA_JAVA_H javah PATHS ${JAVA_BIN_PATH} )

 MESSAGE ( STATUS "  JAVA_VERSION:   " ${JAVA_VERSION} )
 MESSAGE ( STATUS "  JAVA_RUNTIME:   " ${JAVA_RUNTIME} )
 MESSAGE ( STATUS "  JAVA_COMPILE:   " ${JAVA_COMPILE} )
 MESSAGE ( STATUS "  JAVA_ARCHIVE:   " ${JAVA_ARCHIVE} )
 MESSAGE ( STATUS "  JAVA_JAVA_H:" ${JAVA_JAVA_H} )
 MESSAGE ( STATUS "  JAVA_INCLUDE_PATH:  " ${JAVA_INCLUDE_PATH} )
 MESSAGE ( STATUS "  JAVA_INCLUDE_PATH2: " ${JAVA_INCLUDE_PATH2} )
 MESSAGE ( STATUS "  JAVA_JVM_LIBRARY:   " ${JAVA_JVM_LIBRARY} )
 SET ( PKG_SUPPORT_JAVA 1 )
ENDIF ( JAVA_COMPILE )
SET ( TCLBLEND_JAR_SRCS   tcl/lang/CObject.java
 tcl/lang/IdleHandler.java
 tcl/lang/Interp.java
 tcl/lang/Notifier.java
 tcl/lang/TclList.java
 tcl/lang/TclObject.java
 tcl/lang/TimerHandler.java
 tcl/lang/Util.java )
IF ( WIN32 )
 SET  ( tcljava_CLASSPATH
   ".\;../empty/empty.jar\;../tcljava\;${CMAKE_CURRENT_BINARY_DIR}" )
ELSE ( WIN32 )
 SET  ( tcljava_CLASSPATH
   ".:../empty/empty.jar:../tcljava:${CMAKE_CURRENT_BINARY_DIR}" )
ENDIF ( WIN32 )
ADD_CUSTOM_TARGET ( tcljava.jar.classes
   COMMAND ${JAVA_COMPILE} -d ${CMAKE_CURRENT_BINARY_DIR}
   -classpath ${tcljava_CLASSPATH} ${TCLJAVA_JAR_SRCS}
   WORKING_DIRECTORY src/tcljava )
ADD_CUSTOM_TARGET ( tcljava.jar
   COMMAND ${JAVA_ARCHIVE} cvf ${CMAKE_CURRENT_BINARY_DIR}/tcljava.jar
   tcl
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
ADD_DEPENDENCIES ( tcljava.jar tcljava.jar.classes )

George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Find PerlLibs fails;

2008-07-06 Thread Georgios Petasis

O/H Alexander Neundorf ??:

On Monday 30 June 2008, Georgios Petasis wrote:
  

Hi all,

I am running cmake 2.6 under windows:

MESSAGE ( STATUS "Searching for Perl..." )
FIND_PACKAGE ( Perl )
FIND_PACKAGE ( PerlLibs )
IF ( PERL_FOUND )
  MESSAGE ( STATUS "  PERL_EXECUTABLE:" ${PERL_EXECUTABLE} )
  MESSAGE ( STATUS "  PERL_INCLUDE_PATH:  " ${PERL_INCLUDE_PATH} )
  MESSAGE ( STATUS "  PERL_LIBRARY:   " ${PERL_LIBRARY} )
ENDIF ( PERL_FOUND )

The output is:

-- Searching for Perl...
-- Found Perl: C:/Program Files (x86)/Perl/bin/perl.exe
-- Could NOT find PerlLibs
--   PERL_EXECUTABLE:C:/Program Files (x86)/Perl/bin/perl.exe
--   PERL_INCLUDE_PATH:  PERL_INCLUDE_PATH-NOTFOUND
--   PERL_LIBRARY:   PERL_LIBRARY-NOTFOUND

It seems that it can locate perl (which is also in the PATH), but not
its libs. Can I fix this?



Please have a look at FindPerlLibs.cmake and add some MESSAGE(STATUS ...) to 
find out what is going on exactly. Is it simply the version number which is 
missing ?


Alex

Dear Alex,

I have solved this problem by not making adjustments to cmake files, as 
I have to support computers
with a default cmake installation. Instead, I have put the following 
code in my CMakeLists.txt:


 EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
   -MConfig -e "print \$Config{version}"
   OUTPUT_VARIABLE PERL_OUTPUT
   RESULT_VARIABLE PERL_RETURN_VALUE )
 IF ( NOT PERL_RETURN_VALUE )
   SET ( PERL_VERSION ${PERL_OUTPUT} )
 ENDIF ( NOT PERL_RETURN_VALUE )

 ## Try to fix failure in PERL_INCLUDE_PATH
 IF ( PERL_INCLUDE_PATH MATCHES .*-NOTFOUND )
   EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
 -MConfig -e "print \$Config{archlibexp}"
 OUTPUT_VARIABLE PERL_OUTPUT
 RESULT_VARIABLE PERL_RETURN_VALUE )
   IF ( NOT PERL_RETURN_VALUE )
 FIND_PATH ( PERL_INCLUDE_PATH perl.h ${PERL_OUTPUT}/CORE )
   ENDIF ( NOT PERL_RETURN_VALUE )
 ENDIF ( PERL_INCLUDE_PATH MATCHES .*-NOTFOUND )
 ## Try to fix failure in PERL_LIBRARY
 IF ( PERL_LIBRARY MATCHES .*-NOTFOUND )
   EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
 -MConfig -e "print \$Config{libperl}"
 OUTPUT_VARIABLE PERL_OUTPUT
 RESULT_VARIABLE PERL_RETURN_VALUE )
   IF ( NOT PERL_RETURN_VALUE )
 FIND_LIBRARY ( PERL_LIBRARY NAMES ${PERL_OUTPUT}
 PATHS ${PERL_INCLUDE_PATH} )
   ENDIF ( NOT PERL_RETURN_VALUE )
 ENDIF ( PERL_LIBRARY MATCHES .*-NOTFOUND )
 MESSAGE ( STATUS "  PERL_VERSION:   " ${PERL_VERSION} )
 MESSAGE ( STATUS "  PERL_EXECUTABLE:" ${PERL_EXECUTABLE} )
 MESSAGE ( STATUS "  PERL_INCLUDE_PATH:  " ${PERL_INCLUDE_PATH} )
 MESSAGE ( STATUS "  PERL_LIBRARY:   " ${PERL_LIBRARY} )

But, now my problem is different: I do have perl found, but I cannot 
convince cmake to build my code right.
It seems that an improper linker switch is added automatically by cmake, 
but I am unable to find somewhere the exact link statement that is 
executed by cmake. All options are written in a temp file, which is 
written/deleted instantly.

Any idea on how I can see its contents?

Currently the only way to build my code is with my hand-written makefile :-(
I have been trying to resolve this problem with cmake for more than 5 days.
I still have no clue what cmake adds, but makes global symbols in my dll 
& the perl library different symbols,

so perl cannot update its global structures...

Best regards,

George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Why I cannot build a dll that embeds perl with cmake?

2008-07-04 Thread Georgios Petasis

O/H Georgios Petasis έγραψε:

O/H Georgios Petasis έγραψε:

Hi all,

I have some C code that embeds perl into a C application.

If I compile my code with:

cl.exe 

and then:

link 

the resulting dll works. But if I compile it with cmake, my code 
always crashes, because a perl structure (a global pointer) is left 
uninitialised, and is always NULL. It seems that cmake inserts 
something that changes the building process.
How can I find what commands are executed when the code is 
compiled/linked?

I even tried the following:

EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
-MExtUtils::Embed -e ccopts
OUTPUT_VARIABLE PERL_OUTPUT
RESULT_VARIABLE PERL_RETURN_VALUE )
IF ( NOT PERL_RETURN_VALUE )
STRING ( REPLACE "-O1" "" ADDITIONAL_PERL_CCOPTS ${PERL_OUTPUT} )
ENDIF ( NOT PERL_RETURN_VALUE )
EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
-MExtUtils::Embed -e ldopts
OUTPUT_VARIABLE PERL_OUTPUT
RESULT_VARIABLE PERL_RETURN_VALUE )
IF ( NOT PERL_RETURN_VALUE )
SET ( ADDITIONAL_PERL_LDOPTS ${PERL_OUTPUT} )
ENDIF ( NOT PERL_RETURN_VALUE )
SET ( CMAKE_C_FLAGS "-DUSE_TCL_STUBS ${ADDITIONAL_PERL_CCOPTS}" )
SET ( CMAKE_C_FLAGS_RELEASE "" )
SET ( CMAKE_C_FLAGS_DEBUG "" )
SET ( CMAKE_SHARED_LINKER_FLAGS ${ADDITIONAL_PERL_LDOPTS} )
SET ( CMAKE_SHARED_LINKER_FLAGS_RELEASE "" )
SET ( CMAKE_SHARED_LINKER_FLAGS_DEBUG "" )

But it didn't change anything. The produced dll still crashes. Any 
ideas?


Regards,

George
Actually, looking at the two dlls (one produced with a nmake makefile 
I have written, and the one built with cmake), they import different 
functions:


nmake cmake
300 Perl_get_context 300 Perl_get_context
265 Perl_Tstack_sp_ptr 265 Perl_Tstack_sp_ptr
214 Perl_Tmarkstack_ptr_ptr 214 Perl_Tmarkstack_ptr_ptr
263 Perl_Tstack_base_ptr 263 Perl_Tstack_base_ptr
2C5 Perl_croak 2C5 Perl_croak
2C6 Perl_croak_nocontext 2C6 Perl_croak_nocontext
196 Perl_Isv_undef_ptr 196 Perl_Isv_undef_ptr
3D6 Perl_newSVpv 3D6 Perl_newSVpv
467 Perl_sv_2mortal 467 Perl_sv_2mortal
518 Perl_win32_init 518 Perl_win32_init
51F perl_alloc 51F perl_alloc
525 perl_construct 525 perl_construct
529 perl_parse 529 perl_parse
52A perl_run 52A perl_run
526 perl_destruct 526 perl_destruct
527 perl_free 527 perl_free
454 Perl_set_context 454 Perl_set_context
2F3 Perl_eval_pv 2F3 Perl_eval_pv
462 Perl_sv_2bool 462 Perl_sv_2bool
46A Perl_sv_2pv_flags 46A Perl_sv_2pv_flags
51C boot_DynaLoader 51C boot_DynaLoader
3E1 Perl_newXS 3E1 Perl_newXS
3E2 Perl_newXS_flags
197 Perl_Isv_yes_ptr

How is possible to use the same definitions & link flags and get 
different results?


George

And here are the exact commands: the top line is my nmake commands, and 
the second line is the cmake command:


"C:\Program Files (x86)\Perl/bin/perl.exe" "C:\Program Files 
(x86)\Perl\lib\ExtUtils/xsubpp"  -typemap "C:\Program Files 
(x86)\Perl\lib\ExtUtils\typemap"   .\Tcl.xs > .\Tcl.c


cd C:\Users\petasis\Ellogon\lib\tclperl-3.2
"C:\Program Files (x86)\Perl\bin\perl.exe" "C:/Program Files 
(x86)/Perl/lib/ExtUtils/xsubpp" -typemap "C:/Program Files 
(x86)/Perl/lib/ExtUtils/typemap" Tcl.xs > Tcl.c



cl -nologo -c -W3 -EHsc -FD -FpBuildTemp -Gs  -D "WIN32" -D "NDEBUG" -D 
"_WINDOWS" -D "_MBCS"  -D "_USRDLL" -D "USE_TCL_STUBS" -nologo -GF -W3 
-MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT 
-DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC 
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO 
-DPERL_MSVCRT_READFIX  -I"C:\Program Files (x86)\Perl\lib\CORE" 
-I"C:\Program Files (x86)\Tcl\include"  -I"." .\tclperl.c  .\tclthread.c 
.\Tcl.c


C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe  
@C:\Users\George\AppData\Local\Temp\nm41D2.tmp

tclperl.c

Any idea on how can I get the contents of 
"C:\Users\George\AppData\Local\Temp\nm41D2.tmp"? It is created and 
deleted so fast, that it is impossible to see it...


George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Why I cannot build a dll that embeds perl with cmake?

2008-07-04 Thread Georgios Petasis

O/H Georgios Petasis έγραψε:

Hi all,

I have some C code that embeds perl into a C application.

If I compile my code with:

cl.exe 

and then:

link 

the resulting dll works. But if I compile it with cmake, my code 
always crashes, because a perl structure (a global pointer) is left 
uninitialised, and is always NULL. It seems that cmake inserts 
something that changes the building process.
How can I find what commands are executed when the code is 
compiled/linked?

I even tried the following:

EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
-MExtUtils::Embed -e ccopts
OUTPUT_VARIABLE PERL_OUTPUT
RESULT_VARIABLE PERL_RETURN_VALUE )
IF ( NOT PERL_RETURN_VALUE )
STRING ( REPLACE "-O1" "" ADDITIONAL_PERL_CCOPTS ${PERL_OUTPUT} )
ENDIF ( NOT PERL_RETURN_VALUE )
EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
-MExtUtils::Embed -e ldopts
OUTPUT_VARIABLE PERL_OUTPUT
RESULT_VARIABLE PERL_RETURN_VALUE )
IF ( NOT PERL_RETURN_VALUE )
SET ( ADDITIONAL_PERL_LDOPTS ${PERL_OUTPUT} )
ENDIF ( NOT PERL_RETURN_VALUE )
SET ( CMAKE_C_FLAGS "-DUSE_TCL_STUBS ${ADDITIONAL_PERL_CCOPTS}" )
SET ( CMAKE_C_FLAGS_RELEASE "" )
SET ( CMAKE_C_FLAGS_DEBUG "" )
SET ( CMAKE_SHARED_LINKER_FLAGS ${ADDITIONAL_PERL_LDOPTS} )
SET ( CMAKE_SHARED_LINKER_FLAGS_RELEASE "" )
SET ( CMAKE_SHARED_LINKER_FLAGS_DEBUG "" )

But it didn't change anything. The produced dll still crashes. Any ideas?

Regards,

George
Actually, looking at the two dlls (one produced with a nmake makefile I 
have written, and the one built with cmake), they import different 
functions:


nmake cmake
300 Perl_get_context 300 Perl_get_context
265 Perl_Tstack_sp_ptr 265 Perl_Tstack_sp_ptr
214 Perl_Tmarkstack_ptr_ptr 214 Perl_Tmarkstack_ptr_ptr
263 Perl_Tstack_base_ptr 263 Perl_Tstack_base_ptr
2C5 Perl_croak 2C5 Perl_croak
2C6 Perl_croak_nocontext 2C6 Perl_croak_nocontext
196 Perl_Isv_undef_ptr 196 Perl_Isv_undef_ptr
3D6 Perl_newSVpv 3D6 Perl_newSVpv
467 Perl_sv_2mortal 467 Perl_sv_2mortal
518 Perl_win32_init 518 Perl_win32_init
51F perl_alloc 51F perl_alloc
525 perl_construct 525 perl_construct
529 perl_parse 529 perl_parse
52A perl_run 52A perl_run
526 perl_destruct 526 perl_destruct
527 perl_free 527 perl_free
454 Perl_set_context 454 Perl_set_context
2F3 Perl_eval_pv 2F3 Perl_eval_pv
462 Perl_sv_2bool 462 Perl_sv_2bool
46A Perl_sv_2pv_flags 46A Perl_sv_2pv_flags
51C boot_DynaLoader 51C boot_DynaLoader
3E1 Perl_newXS 3E1 Perl_newXS
3E2 Perl_newXS_flags
197 Perl_Isv_yes_ptr

How is possible to use the same definitions & link flags and get 
different results?


George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Why I cannot build a dll that embeds perl with cmake?

2008-07-03 Thread Georgios Petasis

Hi all,

I have some C code that embeds perl into a C application.

If I compile my code with:

cl.exe 

and then:

link 

the resulting dll works. But if I compile it with cmake, my code always 
crashes, because a perl structure (a global pointer) is left 
uninitialised, and is always NULL. It seems that cmake inserts something 
that changes the building process.

How can I find what commands are executed when the code is compiled/linked?
I even tried the following:

EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
 -MExtUtils::Embed -e ccopts
 OUTPUT_VARIABLE PERL_OUTPUT
 RESULT_VARIABLE PERL_RETURN_VALUE )
IF ( NOT PERL_RETURN_VALUE )
 STRING ( REPLACE "-O1" "" ADDITIONAL_PERL_CCOPTS ${PERL_OUTPUT} )
ENDIF ( NOT PERL_RETURN_VALUE )
EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
 -MExtUtils::Embed -e ldopts
 OUTPUT_VARIABLE PERL_OUTPUT
 RESULT_VARIABLE PERL_RETURN_VALUE )
IF ( NOT PERL_RETURN_VALUE )
 SET ( ADDITIONAL_PERL_LDOPTS ${PERL_OUTPUT} )
ENDIF ( NOT PERL_RETURN_VALUE )
SET ( CMAKE_C_FLAGS "-DUSE_TCL_STUBS 
${ADDITIONAL_PERL_CCOPTS}" )

SET ( CMAKE_C_FLAGS_RELEASE "" )
SET ( CMAKE_C_FLAGS_DEBUG   "" )
SET ( CMAKE_SHARED_LINKER_FLAGS ${ADDITIONAL_PERL_LDOPTS} )
SET ( CMAKE_SHARED_LINKER_FLAGS_RELEASE "" )
SET ( CMAKE_SHARED_LINKER_FLAGS_DEBUG   "" )

But it didn't change anything. The produced dll still crashes. Any ideas?

Regards,

George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Find PerlLibs fails;

2008-06-30 Thread Georgios Petasis

Hi all,

I am running cmake 2.6 under windows:

MESSAGE ( STATUS "Searching for Perl..." )
FIND_PACKAGE ( Perl )
FIND_PACKAGE ( PerlLibs )
IF ( PERL_FOUND )
 MESSAGE ( STATUS "  PERL_EXECUTABLE:" ${PERL_EXECUTABLE} )
 MESSAGE ( STATUS "  PERL_INCLUDE_PATH:  " ${PERL_INCLUDE_PATH} )
 MESSAGE ( STATUS "  PERL_LIBRARY:   " ${PERL_LIBRARY} )
ENDIF ( PERL_FOUND )

The output is:

-- Searching for Perl...
-- Found Perl: C:/Program Files (x86)/Perl/bin/perl.exe
-- Could NOT find PerlLibs
--   PERL_EXECUTABLE:C:/Program Files (x86)/Perl/bin/perl.exe
--   PERL_INCLUDE_PATH:  PERL_INCLUDE_PATH-NOTFOUND
--   PERL_LIBRARY:   PERL_LIBRARY-NOTFOUND

It seems that it can locate perl (which is also in the PATH), but not 
its libs. Can I fix this?

I am using ActivePerl, 5.10.

Regards,

George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] My code, or bug of cpack 2.6?

2008-06-30 Thread Georgios Petasis

Hi all,

I am using cmake 2.6, and I try to simply copy some directories with the 
following code:


FOREACH ( PKG_MODULE GUI Utils Httpd ellogon2.0 doc )
MESSAGE ( STATUS "  Installation of Module: " ${PKG_MODULE} )
 INSTALL ( DIRECTORY ${PKG_MODULE} DESTINATION .
   FILE_PERMISSIONS  OWNER_READ OWNER_WRITE
 GROUP_READ
 WORLD_READ
   DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
 GROUP_READ GROUP_EXECUTE
 WORLD_READ WORLD_EXECUTE
   PATTERN ".svn"EXCLUDE
   PATTERN "Makefile"EXCLUDE
   PATTERN "Makefile.vc" EXCLUDE
   PATTERN "Makefile.in" EXCLUDE
 )
ENDFOREACH ( PKG_MODULE )

When I do "make install" under windows & linux, everything is ok.
Making package under windows also works just fine. But make package 
under linux
is not working well: some files from subdirectories of a folder named 
"Tools" (inside "ellogon2.0")
end up in the root folder of the generated archives. Am I doing 
something wrong?

Or I have hit a cpack bug?
Any ideas?

Regards,

George
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Add_definitions() also affects RC_FLAGS ?

2008-06-28 Thread Georgios Petasis

O/H Bob Paddock ??:

On Sunday 22 June 2008 03:25:21 pm Bill Hoffman wrote:
  

Don't use add_definitions for compiler flags.  Use CMAKE_CXX_FLAGS or
CMAKE_C_FLAGS.



Can you show an example please?

When I try these:

SET (CMAKE_CXX_FLAGS_DEBUG "-Wall" )
SET (CMAKE_CXX_FLAGS_RELEASE "-Wall" )
SET (CMAKE_C_FLAGS_DEBUG "-Wall" )
SET (CMAKE_C_FLAGS_RELEASE "-Wall" )

I do not find "-Wall" in the resultant Makefile (Actually 'Wall' doesn't
appear *anyplace* in the build directory???),
for that mater I don't find the default values in
the Makefile either.  What am I doing wrong?

This after doing a rm -rf Build;mkdir Build... to remove any potential of a 
cached file being found.


I'm using this to show the values, which do show what I expect to see:
MESSAGE("c init = ${CMAKE_C_FLAGS_INIT}")
MESSAGE("c debug init = ${CMAKE_C_FLAGS_DEBUG_INIT}")
MESSAGE("c release = ${CMAKE_C_FLAGS_RELEASE}")
MESSAGE("c debug = ${CMAKE_C_FLAGS_DEBUG}")
MESSAGE("c++ init = ${CMAKE_CXX_FLAGS_INIT}")
MESSAGE("c++ debug init = ${CMAKE_CXX_FLAGS_DEBUG_INIT}")
MESSAGE("c++ release = ${CMAKE_CXX_FLAGS_RELEASE}")
MESSAGE("c++ debug = ${CMAKE_CXX_FLAGS_DEBUG}")

Also if I try to this:

SET (CMAKE_C_FLAGS_RELEASE "-Wall" ${CMAKE_C_FLAGS_RELEASE} )

I get this:

c release = -Wall;-O3 -DNDEBUG

Note the added ";".  Where did that come from?

This is with under Linux with CMake 2.4 patch 8,
with GCC as the target compiler.
  

Try:

SET (CMAKE_C_FLAGS_RELEASE "-Wall ${CMAKE_C_FLAGS_RELEASE}" )

George


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] CMake newbie...

2008-06-28 Thread Georgios Petasis

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.


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?

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?


Regards,

George

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake