Skip to content

Commit

Permalink
Headers added to generated projects
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloambrosio committed Mar 9, 2013
1 parent 93a0d6a commit e681c50
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -98,9 +98,9 @@ endif()
# Cucumber-Cpp # 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}) set(CUKE_LIBRARIES cucumber-cpp ${CUKE_EXTRA_LIBRARIES})


Expand Down
14 changes: 11 additions & 3 deletions src/CMakeLists.txt
Expand Up @@ -17,17 +17,25 @@ set(CUKE_SOURCES


if(GTEST_FOUND) if(GTEST_FOUND)
include_directories(${GTEST_INCLUDE_DIRS}) include_directories(${GTEST_INCLUDE_DIRS})
set(CUKE_SOURCES ${CUKE_SOURCES} drivers/GTestDriver.cpp) list(APPEND CUKE_SOURCES drivers/GTestDriver.cpp)
endif() endif()


if(CPPSPEC_FOUND) if(CPPSPEC_FOUND)
include_directories(${CPPSPEC_INCLUDE_DIRS}) include_directories(${CPPSPEC_INCLUDE_DIRS})
set(CUKE_SOURCES ${CUKE_SOURCES} drivers/CppSpecDriver.cpp) list(APPEND CUKE_SOURCES drivers/CppSpecDriver.cpp)
endif() endif()


if(Boost_UNIT_TEST_FRAMEWORK_FOUND) if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
set(CUKE_SOURCES ${CUKE_SOURCES} drivers/BoostDriver.cpp) list(APPEND CUKE_SOURCES drivers/BoostDriver.cpp)
endif() 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}) add_library(cucumber-cpp STATIC ${CUKE_SOURCES})

0 comments on commit e681c50

Please sign in to comment.