Fixed cmake files to support the apps option in ana.

This commit is contained in:
Guillermo Biset 2010-06-10 20:00:19 +00:00
parent c1be239dca
commit 4be54effb5
4 changed files with 12 additions and 19 deletions

View file

@ -4,13 +4,9 @@ project( ana )
add_subdirectory( src )
add_subdirectory( apps )
option( apps "Compile sample applications as well" OFF )
if ( apps )
message ( STATUS "Compiling sample applications as well." )
add_subdirectory( apps )
endif ( apps )

View file

@ -1,20 +1,17 @@
find_library( ANA ana REQUIRED )
find_library( GETOPT getopt_pp REQUIRED )
if ( ANA )
if ( GETOPT )
add_executable( server server.cpp )
include_directories( ../../api )
target_link_libraries( server ${ANA} ${GETOPT} )
if ( GETOPT )
add_executable( server server.cpp )
add_executable( client client.cpp )
target_link_libraries( server ana ${GETOPT} )
target_link_libraries( client ${ANA} ${GETOPT} )
add_executable( client client.cpp )
else ( GETOPT )
message ( FATAL_ERROR "Install GetOpt_pp: getoptpp.googlecode.com" )
endif (GETOPT )
else ( ANA )
message ( FATAL_ERROR "Install the ana library." )
endif ( ANA )
target_link_libraries( client ana ${GETOPT} )
else ( GETOPT )
message ( FATAL_ERROR "Install GetOpt_pp: getoptpp.googlecode.com" )
endif (GETOPT )

View file

@ -34,7 +34,7 @@
#include "getopt_pp.h"
#include "ana/ana.hpp"
#include "ana.hpp"
using namespace GetOpt;
using namespace ana;

View file

@ -34,7 +34,7 @@
#include <boost/bind.hpp>
#include "ana/ana.hpp"
#include "ana.hpp"
#include "getopt_pp.h"
using namespace GetOpt;