Thread: pgadmin and cmake
Guys, I've just committed initial support for building pgadmin using cmake instead of autoconf/autotools. Amongst other things, this leaves us with *one* build system, on both Unix and Windows. For now, the old system stays in there completely untouched, until we can prove that this works on all platforms. Obviously it won't do that from the start - at least I don't expect it to. So please - get the latest svn trunk and try to build it with cmake on your platform, let us know how that works, and we'll try to get this going :-) A super-quick primer to get going. First of all, cmake "prefers" building outside the source directory, so here's a typical way to do it (assuming your pgadmin directory is "pgadmin3"): mkdir ../pgadmin3-build cd ../pgadmin3-build cmake -D CMAKE_INSTALL_PREFIX=/tmp/pgadmin_test_install ../pgadmin3 make On unix, the "cmake" command will generate a set of subdirs in the build directory, along with standard Makefiles and rules. So - please get this, and test it on as many platforms as possible, and report back! //Magnus
Magnus Hagander a écrit : > [...] > A super-quick primer to get going. First of all, cmake "prefers" > building outside the source directory, so here's a typical way to do it > (assuming your pgadmin directory is "pgadmin3"): > > mkdir ../pgadmin3-build > cd ../pgadmin3-build > cmake -D CMAKE_INSTALL_PREFIX=/tmp/pgadmin_test_install ../pgadmin3 > make > I tried the cmake command on a Kubuntu 8.04 (the one I also use for pgAdmin's development). I had a few error messages (see the attached file). I don't really know what this all means. Perhaps you do know ? -- Guillaume. http://www.postgresqlfr.org http://dalibo.com guillaume@laptop$ cmake -D CMAKE_INSTALL_PREFIX=../pgadmin3.pouet ../pgadmin3.cmake -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at CMakeLists.txt:85 (FIND_PACKAGE): find_package could not find module FindWX.cmake or a configuration file for package WX. Adjust CMAKE_MODULE_PATH to find FindWX.cmake or set WX_DIR to the directory containing a CMake configuration file for WX. The file will have one of the following names: WXConfig.cmake wx-config.cmake CMake Error at CMakeLists.txt:97 (FIND_PACKAGE): find_package could not find module FindPG.cmake or a configuration file for package PG. Adjust CMAKE_MODULE_PATH to find FindPG.cmake or set PG_DIR to the directory containing a CMake configuration file for PG. The file will have one of the following names: PGConfig.cmake pg-config.cmake -- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig -- Found LibXml2: /usr/lib/libxml2.so -- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig -- Found LibXslt: /usr/lib/libxslt.so -- Looking for arpa/inet.h -- Looking for arpa/inet.h - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for inet_ntoa -- Looking for inet_ntoa - found -- Looking for inttypes.h -- Looking for inttypes.h - found -- Looking for memmove -- Looking for memmove - found -- Looking for memory.h -- Looking for memory.h - found -- Looking for memset -- Looking for memset - found -- Looking for netdb.h -- Looking for netdb.h - found -- Looking for netinet/in.h -- Looking for netinet/in.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stdlib.h -- Looking for stdlib.h - found -- Looking for strings.h -- Looking for strings.h - found -- Looking for string.h -- Looking for string.h - found -- Looking for sys/stat.h -- Looking for sys/stat.h - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for unistd.h -- Looking for unistd.h - found -- -- ================================================================================ -- Configuration summary: -- -- Project : pgadmin3 -- Description : pgAdmin III is a graphical management tool for PostgreSQL -- Version : 1.9.0 -- -- Target directory : /home/guillaume/freeprojects/svn.pgadmin.org/trunk/pgadmin3.pouet -- -- PostgreSQL version : -- PostgreSQL path : -- PostgreSQL config binary : -- PostgreSQL include path : -- PostgreSQL library path : -- -- libxml2 include path : /usr/include/libxml2 -- libxml2 libraries : /usr/lib/libxml2.so -- libxslt include path : /usr/include -- libxslt libraries : /usr/lib/libxslt.so -- -- wxWidgets version : -- wxWidgets path : -- wxWidgets config binary : -- wxWidgets Static linking : YES -- wxWidgets Debug? : NO -- ================================================================================ -- -- Configuring done
Guillaume Lelarge wrote: > Magnus Hagander a écrit : >> [...] >> A super-quick primer to get going. First of all, cmake "prefers" >> building outside the source directory, so here's a typical way to do it >> (assuming your pgadmin directory is "pgadmin3"): >> >> mkdir ../pgadmin3-build >> cd ../pgadmin3-build >> cmake -D CMAKE_INSTALL_PREFIX=/tmp/pgadmin_test_install ../pgadmin3 >> make >> > > I tried the cmake command on a Kubuntu 8.04 (the one I also use for > pgAdmin's development). I had a few error messages (see the attached > file). I don't really know what this all means. Perhaps you do know ? > Strange. I had "svn add":ed the directory "cmake", but it didn't get included in the commit. "svn commit" would do not commit it. "svn add" said it was already added... I removed the whole thing and re-committed, please try again. //Magnus
Magnus Hagander a écrit : > Guillaume Lelarge wrote: >> Magnus Hagander a écrit : >>> [...] >>> A super-quick primer to get going. First of all, cmake "prefers" >>> building outside the source directory, so here's a typical way to do it >>> (assuming your pgadmin directory is "pgadmin3"): >>> >>> mkdir ../pgadmin3-build >>> cd ../pgadmin3-build >>> cmake -D CMAKE_INSTALL_PREFIX=/tmp/pgadmin_test_install ../pgadmin3 >>> make >>> >> I tried the cmake command on a Kubuntu 8.04 (the one I also use for >> pgAdmin's development). I had a few error messages (see the attached >> file). I don't really know what this all means. Perhaps you do know ? >> > > Strange. I had "svn add":ed the directory "cmake", but it didn't get > included in the commit. "svn commit" would do not commit it. "svn add" > said it was already added... > > I removed the whole thing and re-committed, please try again. > I had an issue, wx being not available. My wx build is in /opt/wx-2.8. I use the --with-wx option with configure. Is there a same switch with cmake ? -- Guillaume. http://www.postgresqlfr.org http://dalibo.com
Guillaume Lelarge wrote: > Magnus Hagander a écrit : >> Guillaume Lelarge wrote: >>> Magnus Hagander a écrit : >>>> [...] >>>> A super-quick primer to get going. First of all, cmake "prefers" >>>> building outside the source directory, so here's a typical way to do it >>>> (assuming your pgadmin directory is "pgadmin3"): >>>> >>>> mkdir ../pgadmin3-build >>>> cd ../pgadmin3-build >>>> cmake -D CMAKE_INSTALL_PREFIX=/tmp/pgadmin_test_install ../pgadmin3 >>>> make >>>> >>> I tried the cmake command on a Kubuntu 8.04 (the one I also use for >>> pgAdmin's development). I had a few error messages (see the attached >>> file). I don't really know what this all means. Perhaps you do know ? >>> >> Strange. I had "svn add":ed the directory "cmake", but it didn't get >> included in the commit. "svn commit" would do not commit it. "svn add" >> said it was already added... >> >> I removed the whole thing and re-committed, please try again. >> > > I had an issue, wx being not available. My wx build is in /opt/wx-2.8. I > use the --with-wx option with configure. Is there a same switch with cmake ? Nope. Hmm, not entirely sure since that find wx module is from Dave ;-). But I think you can either: 1) Add the directory of wx-config to your PATH before you run it 2) I think you can try to add -DCMAKE_PROGRAM_PATH=/opt/wx-2.8/bin (or wherever wx-config is) to the commandline //Magnus
use ccmake instead of cmake (or use the GUI) - the config names it displays can be used with -D on the cmake command line. On 9/19/08, Magnus Hagander <magnus@hagander.net> wrote: > Guillaume Lelarge wrote: >> Magnus Hagander a écrit : >>> Guillaume Lelarge wrote: >>>> Magnus Hagander a écrit : >>>>> [...] >>>>> A super-quick primer to get going. First of all, cmake "prefers" >>>>> building outside the source directory, so here's a typical way to do it >>>>> (assuming your pgadmin directory is "pgadmin3"): >>>>> >>>>> mkdir ../pgadmin3-build >>>>> cd ../pgadmin3-build >>>>> cmake -D CMAKE_INSTALL_PREFIX=/tmp/pgadmin_test_install ../pgadmin3 >>>>> make >>>>> >>>> I tried the cmake command on a Kubuntu 8.04 (the one I also use for >>>> pgAdmin's development). I had a few error messages (see the attached >>>> file). I don't really know what this all means. Perhaps you do know ? >>>> >>> Strange. I had "svn add":ed the directory "cmake", but it didn't get >>> included in the commit. "svn commit" would do not commit it. "svn add" >>> said it was already added... >>> >>> I removed the whole thing and re-committed, please try again. >>> >> >> I had an issue, wx being not available. My wx build is in /opt/wx-2.8. I >> use the --with-wx option with configure. Is there a same switch with cmake >> ? > > Nope. > > Hmm, not entirely sure since that find wx module is from Dave ;-). But I > think you can either: > > 1) Add the directory of wx-config to your PATH before you run it > 2) I think you can try to add -DCMAKE_PROGRAM_PATH=/opt/wx-2.8/bin (or > wherever wx-config is) to the commandline > > > //Magnus > > -- > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers > -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com