Permalink
Browse files

Headers added to generated projects

  • Loading branch information...
1 parent 93a0d6a commit e681c5028a756d8f711574a86e84ca8b98333d5c @paoloambrosio committed Mar 9, 2013
Showing with 13 additions and 5 deletions.
  1. +2 −2 CMakeLists.txt
  2. +11 −3 src/CMakeLists.txt
View
@@ -98,9 +98,9 @@ endif()
# Cucumber-Cpp
#
-set(CUKE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
+set(CUKE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
-include_directories(${CUKE_INCLUDE_DIRS})
+include_directories(${CUKE_INCLUDE_DIR})
set(CUKE_LIBRARIES cucumber-cpp ${CUKE_EXTRA_LIBRARIES})
View
@@ -17,17 +17,25 @@ set(CUKE_SOURCES
if(GTEST_FOUND)
include_directories(${GTEST_INCLUDE_DIRS})
- set(CUKE_SOURCES ${CUKE_SOURCES} drivers/GTestDriver.cpp)
+ list(APPEND CUKE_SOURCES drivers/GTestDriver.cpp)
endif()
if(CPPSPEC_FOUND)
include_directories(${CPPSPEC_INCLUDE_DIRS})
- set(CUKE_SOURCES ${CUKE_SOURCES} drivers/CppSpecDriver.cpp)
+ list(APPEND CUKE_SOURCES drivers/CppSpecDriver.cpp)
endif()
if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
- set(CUKE_SOURCES ${CUKE_SOURCES} drivers/BoostDriver.cpp)
+ list(APPEND CUKE_SOURCES drivers/BoostDriver.cpp)
endif()
+if(CMAKE_EXTRA_GENERATOR OR MSVC_IDE)
+ message(STATUS "Adding header files to project")
+ file(GLOB_RECURSE CUKE_HEADERS "${CUKE_INCLUDE_DIR}/cucumber-cpp/*.hpp")
+ if(MSVC_IDE)
+ source_group("Header Files" FILES ${CUKE_HEADERS})
+ endif()
+ list(APPEND CUKE_SOURCES ${CUKE_HEADERS})
+endif()
add_library(cucumber-cpp STATIC ${CUKE_SOURCES})

0 comments on commit e681c50

Please sign in to comment.