From 1c22d7833d19356f1d12b5dc2b1ed6ba9055a0c9 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Wed, 16 Mar 2016 14:03:42 +0100 Subject: [PATCH] small modification --- .gitignore | 3 ++- CMakeLists.txt | 20 ++++++++++++++++++++ template.cmake | 9 +++++++-- test/CMakeLists.txt | 5 ++++- 4 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore index fcf5c34..715dc43 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ test/CMakeFiles/* cmake_install.cmake Makefile CMakeCache.txt - +*.user +build-* diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9b142df --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,20 @@ +project(TestTemplate) + +cmake_minimum_required(VERSION 2.8) +include(ExternalProject) + +ExternalProject_Add( + sparrow_input + PREFIX ${PROJECT_SOURCE_DIR}/.. + GIT_REPOSITORY Lendemor:lum1ere%40@https://git.epicsparrow.com/epicsparrow/SparrowInput.git +) + +EXTERNALProject_get_property(sparrow_input install_dir) + +MESSAGE(STATUS ${install_dir}) + +add_library(sparrow_input) + +include(template.cmake) + + diff --git a/template.cmake b/template.cmake index ef97ed8..d3483f5 100644 --- a/template.cmake +++ b/template.cmake @@ -68,7 +68,6 @@ else() message(WARNING "NO SOURCE FILE PROVIDED") endif() - add_definitions(-std=c++11) #find libraries @@ -123,6 +122,7 @@ if(USE_INPUT) set(USE_SFML True) LIST(APPEND INCLUDE_PATHS "\n" ${PROJECT_SOURCE_DIR}/../sparrowinput/src) + LIST(APPEND INCLUDE_PATHS "\n" ${PROJECT_SOURCE_DIR}/../SparrowInput/src) LIST(APPEND LIB_DEPENDENCIES_LIST ${SPARROW_INPUT_LIBRARY}) endif() @@ -176,7 +176,12 @@ if(USE_SFML) ) endif() - LIST(APPEND LIB_DEPENDENCIES_LIST ${SFML_LIBRARY_WINDOW} ${SFML_LIBRARY_GRAPHICS} ${SFML_LIBRARY_SYSTEM} ${SFML_LIBRARY_AUDIO} ${SFML_DEPENDENCIES}) # order is VERY important + LIST(APPEND LIB_DEPENDENCIES_LIST + ${SFML_LIBRARY_WINDOW} + ${SFML_LIBRARY_GRAPHICS} + ${SFML_LIBRARY_SYSTEM} + ${SFML_LIBRARY_AUDIO} + ${SFML_DEPENDENCIES}) # order is VERY important endif() if(USE_BULLET) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4263e96..ab2fc83 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,4 +3,7 @@ include(test.cmake) -cmake_minimum_required(VERSION 2.8) \ No newline at end of file +cmake_minimum_required(VERSION 2.8) + +include(../template.cmake) +