forked from bblanchon/ArduinoJson
Splitted CMakeLists.txt
This commit is contained in:
@ -1,19 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.4)
|
cmake_minimum_required(VERSION 2.8.4)
|
||||||
project(ArduinoJson)
|
project(ArduinoJson)
|
||||||
|
|
||||||
file(GLOB_RECURSE SRCS_FILES srcs/*.cpp)
|
enable_testing()
|
||||||
file(GLOB TESTS_FILES tests/*.cpp)
|
|
||||||
|
|
||||||
add_library(ArduinoJson ${SRCS_FILES})
|
add_subdirectory(srcs)
|
||||||
|
add_subdirectory(tests)
|
||||||
include_directories(
|
|
||||||
srcs
|
|
||||||
third-party/gtest-1.7.0
|
|
||||||
third-party/gtest-1.7.0/include)
|
|
||||||
|
|
||||||
add_executable(ArduinoJsonTests
|
|
||||||
${TESTS_FILES}
|
|
||||||
third-party/gtest-1.7.0/src/gtest-all.cc
|
|
||||||
third-party/gtest-1.7.0/src/gtest_main.cc)
|
|
||||||
|
|
||||||
target_link_libraries(ArduinoJsonTests ArduinoJson)
|
|
3
srcs/CMakeLists.txt
Normal file
3
srcs/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
file(GLOB_RECURSE SRCS_FILES *.cpp)
|
||||||
|
|
||||||
|
add_library(ArduinoJson ${SRCS_FILES})
|
17
tests/CMakeLists.txt
Normal file
17
tests/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
set(GTEST_DIR ../third-party/gtest-1.7.0)
|
||||||
|
|
||||||
|
file(GLOB TESTS_FILES *.cpp)
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
../srcs
|
||||||
|
${GTEST_DIR}
|
||||||
|
${GTEST_DIR}/include)
|
||||||
|
|
||||||
|
add_executable(ArduinoJsonTests
|
||||||
|
${TESTS_FILES}
|
||||||
|
${GTEST_DIR}/src/gtest-all.cc
|
||||||
|
${GTEST_DIR}/src/gtest_main.cc)
|
||||||
|
|
||||||
|
target_link_libraries(ArduinoJsonTests ArduinoJson)
|
||||||
|
|
||||||
|
add_test(ArduinoJsonTests ArduinoJsonTests)
|
Reference in New Issue
Block a user