Skip to content

Commit

Permalink
working on build system
Browse files Browse the repository at this point in the history
  • Loading branch information
rtv committed Apr 15, 2009
1 parent b6a85d6 commit f2e6d37
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 30 deletions.
22 changes: 11 additions & 11 deletions CMakeLists.txt
@@ -1,17 +1,17 @@
cmake_minimum_required(VERSION 2.6)

PROJECT(autolab-nd)
PROJECT(autolab-wp)
SET( V_MAJOR 0 )
SET( V_MINOR 1 )
SET( V_BUGFIX 0 )

INCLUDE(FindPkgConfig)
SET( VERSION ${V_MAJOR}.${V_MINOR}.${V_BUGFIX} )
SET( APIVERSION ${V_MAJOR}.${V_MINOR} )

#add definitions, compiler switches, etc.
ADD_DEFINITIONS(-g -Wall -O2)

# pkg_search_module( GLIB REQUIRED gthread-2.0 )

# pkg_search_module( STAGE REQUIRED stage )
#MESSAGE(STAGE "${STAGE_LIBRARY_DIRS}" )
#MESSAGE(STAGE "${STAGE_LIBRARIES}" )
#MESSAGE(STAGEDIR "${STAGE_INCLUDE_DIRS}" )

ADD_SUBDIRECTORY(src)

# Create and install the pkgconfig file from the .in template
SET( PKGFILE ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc )
CONFIGURE_FILE( ${PKGFILE}.in ${PKGFILE} @ONLY)
INSTALL( FILES ${PKGFILE} DESTINATION lib/pkgconfig/)
8 changes: 8 additions & 0 deletions autolab-wp.pc.in
@@ -0,0 +1,8 @@
prefix=@CMAKE_INSTALL_PREFIX@

Name: @PROJECT_NAME@
Description: Wavefront Planner global navigation implmentation
Version: @VERSION@
Requires:
Libs: -L${prefix}/lib -l@PROJECT_NAME@
Cflags: -I${prefix}/include/@PROJECT_NAME@-@APIVERSION@
43 changes: 24 additions & 19 deletions src/CMakeLists.txt
@@ -1,25 +1,30 @@

SET( TARGET ${PROJECT_NAME} )
SET( SOURCES
error.c
common.cpp
utilities.cpp
gridmap.cpp
wavefrontmap.cpp
mapmarker.cpp
logwriter.cpp
rangefinder.cpp
ccolor.cpp
)
SET( HEADERS
wavefrontmap.h
)

# build a shared library
ADD_LIBRARY( autolab-wp SHARED
error.c
utilities.cpp
common.cpp
# error.c
utilities.cpp
gridmap.cpp
wavefrontmap.cpp
mapmarker.cpp
logwriter.cpp
rangefinder.cpp
ccolor.cpp
)
ADD_LIBRARY( ${TARGET} SHARED ${SOURCES} )

# give the shared library a version number
SET_TARGET_PROPERTIES( ${TARGET} PROPERTIES
VERSION ${VERSION}
)

#TARGET_LINK_LIBRARIES( fasrrobot
# ${OPENGL_LIBRARIES}
#)
INSTALL(TARGETS ${TARGET}
LIBRARY DESTINATION lib )

INSTALL(TARGETS autolab-wp
LIBRARY DESTINATION lib
INSTALL(FILES ${HEADERS}
DESTINATION include/${PROJECT_NAME}-${APIVERSION}
)

0 comments on commit f2e6d37

Please sign in to comment.