I was able to build the external project that required cmake like this:
include(ExternalProject)

ExternalProject_Add(sdl
    HG_REPOSITORY http://hg.libsdl.org/SDL
    UPDATE_COMMAND hg pull -u http://hg.libsdl.org/SDL

    CMAKE_ARGS -DSDL_STATIC:BOOL=FALSE
    -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/lib

    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL

    INSTALL_DIR ${CMAKE_BINARY_DIR}
    )
ExternalProject_Get_Property(sdl install_dir)
SET(SDL_INSTALL_DIR ${install_dir})


now this second file uses ./configure to set up it's environment.
I can build it by going into the folder first running ./autogen.sh then
./configure ...

or If I use this external project script below
ExternalProject_Add(sdl_image
    DEPENDS sdl
    HG_REPOSITORY http://hg.libsdl.org/SDL_image/
    UPDATE_COMMAND hg pull -u http://hg.libsdl.org/SDL_image/

    # MAKE_COMMAND make
    CONFIGURE_COMMAND  ${CMAKE_CURRENT_SOURCE_DIR}/SDL_image/./configure
    --prefix=${SDL_INSTALL_DIR}/lib
#adding this prefix I get further in my build then I get an error

    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL_image

    INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}
    )

error:
missing: line 81: aclocal-1.13:
 command not found
WARNING: 'aclocal-1.13' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>

I can't actually get cmake to run the autogen script for me. If I leave and
manually go run ./autogen.sh and then re-run this cmake command things will
built correctly.

How can I run the autogen.sh command from within that
"ExternalProject_Add(sdl_image ..)" block?
-- 

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

Reply via email to