Commit 40f107fd authored by Philippe Gaussier's avatar Philippe Gaussier
Browse files

Suppress unused file (merging).

parent e5c896c2
# Root Cmake. Use to link the different libraries
#
# @author sylvain Colomer, P. Gaussier
# @version 1.0
#########################################################################################################
### GENERAL CONFIG ##
#########################################################################################################
message("%%% PROJECT DRONE-FLY-MONITOR")
message("\n%% GENERAL CONFIGURATION")
# GENERAL SETTINGS
project(PixhawkProject CXX)
cmake_minimum_required(VERSION 3.2)
set(VERSION 1.0.0)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
# OUTPUT DIR SETTINGS
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
# COMPILER OPTIONS
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS_DEBUG " -g3 -DDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE " -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ")
#########################################################################################################
### EXTERNAL LIBS ##
#########################################################################################################libncurses5-dev
message("\n%% EXTERNALS libs configuration")
message("- Checking : pkg")
find_package(PkgConfig REQUIRED)
if(PkgConfig_FOUND)
message("-> succes " )
endif()
message("- Checking : mavlink")
if(EXISTS ${CMAKE_SOURCE_DIR}/lib/mavlink)
set(MAVLINK_LIB -I/lib/mavlink)
message("-> succes " )
else()
message("You must install mavlink")
endif()
message("- Checking : Curses")
find_package(Curses REQUIRED)
message("- Checking : GTK3")
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
message("- Checking : Blc channels")
find_package(blc_channel REQUIRED)
find_package(blc_program REQUIRED)
# SDL configuration
find_package(SDL2 REQUIRED)
set(SDL2_LIB_TTF SDL2_ttf)
#########################################################################################################
### EXE GENERATION ##
#########################################################################################################
message("\n%% EXE GENERATION")
# Global adding
add_definitions(
${BL_DEFINITIONS}
# ${GTK3_CFLAGS_OTHER}
-Wall -W
-lpthread
-lncurses
)
include_directories(
./pixhawk_library/include
./lib/mavlink
${BL_INCLUDE_DIRS}
${CURSES_INCLUDE_DIR}
${SDL2_INCLUDE_DIRS}
${GTK3_INCLUDE_DIRS}
)
link_directories(
${GTK3_LIBRARY_DIRS}
)
link_libraries(
${BL_LIBRARIES}
${MAVLINK_LIB}
${CURSES_LIBRARIES}
${SDL2_LIBRARIES}
${SDL2_LIB_TTF}
${GTK3_LIBRARIES}
)
add_definitions(
${GTK3_CFLAGS_OTHER}
)
#%% APP 1
add_executable(
pixhawkServer
pixhawk_server/src/PixhawkServer.cpp pixhawk_server/include/PixhawkServer.h
pixhawk_server/src/Data_Drone.cpp pixhawk_server/include/Data_Drone.h
pixhawk_server/src/Display_IHM.cpp pixhawk_server/include/Display_IHM.h
pixhawk_server/src/Com_SerialReadingThread.cpp pixhawk_server/include/Com_SerialReadingThread.h
pixhawk_server/src/Com_SerialWritingThread.cpp pixhawk_server/include/Com_SerialWritingThread.h
pixhawk_library/src/Com_Serial.cpp
pixhawk_library/src/Abstract_ThreadClass.cpp
pixhawk_library/src/Tools_SDL2.cpp
)
# Test trajectory launch
add_executable(TestDrone
pixhawk_server/test/TestDroneRemoteControl.cpp pixhawk_server/include/PixhawkServer.h
pixhawk_server/src/Data_Drone.cpp pixhawk_server/include/Data_Drone.h
pixhawk_server/src/Display_IHM.cpp pixhawk_server/include/Display_IHM.h
pixhawk_server/src/Com_SerialReadingThread.cpp pixhawk_server/include/Com_SerialReadingThread.h
pixhawk_server/src/Com_SerialWritingThread.cpp pixhawk_server/include/Com_SerialWritingThread.h
pixhawk_library/src/Com_Serial.cpp
pixhawk_library/src/Abstract_ThreadClass.cpp
pixhawk_library/src/Tools_SDL2.cpp
)
# Test pixhawk library
add_executable(TestNcurses
pixhawk_library/test/TestNcurses.cpp
pixhawk_library/src/Display_FrameNcurses.cpp pixhawk_library/include/Display_FrameNcurses.h
pixhawk_library/src/Abstract_ThreadClass.cpp
)
#add_executable(TestSDL2
# pixhawk_library/test/TestSDL2.cpp
# pixhawk_library/src/Display_FrameSdl.cpp pixhawk_library/include/Display_FrameSdl.h
# pixhawk_library/src/Abstract_ThreadClass.cpp
#)
# add_executable(TestGtk
# pixhawk_library/test/TestGtk.cpp
# pixhawk_library/src/Display_FrameGtk.cpp pixhawk_library/include/Display_FrameGtk.h
# pixhawk_library/src/Abstract_ThreadClass.cpp
# )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment