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

CMakeLists: UPPER_NAME always for config.h

parent 4872344d
No related branches found
No related tags found
2 merge requests!39release after RAL,!38After 2nd RAL submission
......@@ -78,18 +78,13 @@ ENDIF()
option(_WOLF_TRACE "Enable wolf tracing macro" ON)
# Does this has any other interest
# 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==================
# ============ DEPENDENCIES ============
FIND_PACKAGE(wolfcore REQUIRED)
# ============ 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
SET(WOLF_CONFIG_DIR ${PROJECT_BINARY_DIR}/conf/${PROJECT_NAME}/internal)
......@@ -107,12 +102,11 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/internal/config.h.in "${WOLF_CONFIG_D
message("CONFIG DIRECTORY ${PROJECT_BINARY_DIR}")
include_directories("${PROJECT_BINARY_DIR}/conf")
#INCLUDES SECTION
# ============EXAMPLE==================
# ============ INCLUDES SECTION ============
INCLUDE_DIRECTORIES(${wolfcore_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(BEFORE "include")
#HEADERS
# ============ HEADERS ============
SET(HDRS_CAPTURE
include/imu/capture/capture_compass.h
include/imu/capture/capture_imu.h
......@@ -140,7 +134,7 @@ SET(HDRS_SENSOR
include/imu/sensor/sensor_imu2d.h
)
#SOURCES
# ============ SOURCES ============
SET(SRCS_CAPTURE
src/capture/capture_imu.cpp
)
......@@ -192,15 +186,13 @@ endif()
#Link the created libraries
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} ${wolfcore_LIBRARIES})
#Build tests
#===============EXAMPLE=========================
#===============Build tests=========================
IF(BUILD_TESTS)
MESSAGE("Building tests.")
add_subdirectory(test)
ENDIF(BUILD_TESTS)
#install library
INSTALL(TARGETS ${PLUGIN_NAME} EXPORT ${PLUGIN_NAME}Targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
......
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