diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b4058f0..5af682b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,9 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") endif () -include_directories("${PROJECT_SOURCE_DIR}/include") +set(include_dir "${PROJECT_SOURCE_DIR}/include") +file(GLOB_RECURSE sqlpp_headers ${include_dir}/*.h) +include_directories(${include_dir}) add_subdirectory(tests) install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/sqlpp11" DESTINATION include) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index abc1625f..54927e83 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,6 @@ macro (build_and_run arg) - add_executable(${arg} ${arg}.cpp) + # Add headers to sources to enable file browsing in IDEs + add_executable(${arg} ${arg}.cpp ${sqlpp_headers}) add_test(${arg} ${arg}) endmacro ()