Skip to content
Snippets Groups Projects
Commit 6094a303 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

CMakeLists: UPPER_NAME always for config.h

parent 0a3a0a2a
No related branches found
No related tags found
2 merge requests!30Release after RAL,!29After 2nd RAL submission
...@@ -80,21 +80,16 @@ ENDIF() ...@@ -80,21 +80,16 @@ ENDIF()
option(_WOLF_TRACE "Enable wolf tracing macro" ON) option(_WOLF_TRACE "Enable wolf tracing macro" ON)
# Does this has any other interest # ============ DEPENDENCIES ============
# but for the examples ?
# yes, for the tests !
IF(BUILD_EXAMPLES OR BUILD_TESTS)
string(TOUPPER ${PROJECT_NAME} UPPER_NAME)
set(_WOLF_ROOT_DIR ${CMAKE_SOURCE_DIR})
ENDIF(BUILD_EXAMPLES OR BUILD_TESTS)
#find dependencies.
# ============EXAMPLE==================
FIND_PACKAGE(wolfcore REQUIRED) FIND_PACKAGE(wolfcore REQUIRED)
FIND_PACKAGE(laser_scan_utils REQUIRED) FIND_PACKAGE(laser_scan_utils REQUIRED)
FIND_PACKAGE(csm QUIET) FIND_PACKAGE(csm QUIET)
FIND_PACKAGE(falkolib QUIET) FIND_PACKAGE(falkolib QUIET)
# ============ CONFIG.H ============
string(TOUPPER ${PROJECT_NAME} UPPER_NAME)
set(_WOLF_ROOT_DIR ${CMAKE_SOURCE_DIR})
# Define the directory where will be the configured config.h # Define the directory where will be the configured config.h
SET(WOLF_CONFIG_DIR ${PROJECT_BINARY_DIR}/conf/${PROJECT_NAME}/internal) SET(WOLF_CONFIG_DIR ${PROJECT_BINARY_DIR}/conf/${PROJECT_NAME}/internal)
...@@ -112,13 +107,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/internal/config.h.in "${WOLF_CONFIG_D ...@@ -112,13 +107,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/internal/config.h.in "${WOLF_CONFIG_D
message("CONFIG DIRECTORY ${PROJECT_BINARY_DIR}") message("CONFIG DIRECTORY ${PROJECT_BINARY_DIR}")
include_directories("${PROJECT_BINARY_DIR}/conf") include_directories("${PROJECT_BINARY_DIR}/conf")
#INCLUDES SECTION # ============ INCLUDES ============
# ============EXAMPLE==================
INCLUDE_DIRECTORIES(${wolfcore_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${wolfcore_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${laser_scan_utils_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${laser_scan_utils_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(BEFORE "include") INCLUDE_DIRECTORIES(BEFORE "include")
#HEADERS # ============ HEADERS ============
SET(HDRS_CAPTURE SET(HDRS_CAPTURE
include/laser/capture/capture_laser_2d.h include/laser/capture/capture_laser_2d.h
) )
...@@ -149,7 +143,7 @@ SET(HDRS_STATE_BLOCK ...@@ -149,7 +143,7 @@ SET(HDRS_STATE_BLOCK
include/laser/state_block/local_parametrization_polyline_extreme.h include/laser/state_block/local_parametrization_polyline_extreme.h
) )
#SOURCES # ============ SOURCES ============
SET(SRCS_CAPTURE SET(SRCS_CAPTURE
src/capture/capture_laser_2d.cpp src/capture/capture_laser_2d.cpp
) )
...@@ -175,13 +169,14 @@ SET(SRCS_YAML ...@@ -175,13 +169,14 @@ SET(SRCS_YAML
src/yaml/sensor_laser_2d_yaml.cpp src/yaml/sensor_laser_2d_yaml.cpp
) )
#OPTIONAL (falko) # ============ OPTIONAL ============
# falko
if (falkolib_FOUND) if (falkolib_FOUND)
message("Found Falkolib. Compiling some extra classes.") message("Found Falkolib. Compiling some extra classes.")
SET(HDRS_PROCESSOR ${HDRS_PROCESSOR} SET(HDRS_PROCESSOR ${HDRS_PROCESSOR}
include/laser/processor/processor_loop_closure_falko.h include/laser/processor/processor_loop_closure_falko.h
) )
#OPTIONAL (falko & CSM) # falko & CSM
if (csm_FOUND) if (csm_FOUND)
SET(HDRS_PROCESSOR ${HDRS_PROCESSOR} SET(HDRS_PROCESSOR ${HDRS_PROCESSOR}
include/laser/processor/processor_loop_closure_falko_icp.h include/laser/processor/processor_loop_closure_falko_icp.h
...@@ -203,7 +198,7 @@ if (falkolib_FOUND) ...@@ -203,7 +198,7 @@ if (falkolib_FOUND)
) )
endif() endif()
#OPTIONAL (CSM) # CSM
if(csm_FOUND) if(csm_FOUND)
message("Found CSM. Compiling some extra classes.") message("Found CSM. Compiling some extra classes.")
SET(HDRS_PROCESSOR ${HDRS_PROCESSOR} SET(HDRS_PROCESSOR ${HDRS_PROCESSOR}
...@@ -229,7 +224,6 @@ endif(csm_FOUND) ...@@ -229,7 +224,6 @@ endif(csm_FOUND)
# create the shared library # create the shared library
ADD_LIBRARY(${PLUGIN_NAME} ADD_LIBRARY(${PLUGIN_NAME}
SHARED SHARED
${SRCS_MATH}
${SRCS_CAPTURE} ${SRCS_CAPTURE}
${SRCS_FEATURE} ${SRCS_FEATURE}
${SRCS_LANDMARK} ${SRCS_LANDMARK}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment