Browse Source

- added root CMakeLists.txt

- moved some stuff from src/CMakeLists.txt to root
master
parent
commit
c0b9bc0b1d
2 changed files with 21 additions and 11 deletions
  1. +7
    -0
      CMakeLists.txt
  2. +14
    -11
      src/CMakeLists.txt

+ 7
- 0
CMakeLists.txt View File

@@ -0,0 +1,7 @@
cmake_minimum_required (VERSION 2.6)
project (libcbag)
add_subdirectory(src)
# TESTS
add_subdirectory(test)
enable_testing()
add_test(NAME Mytest COMMAND Mytest)

+ 14
- 11
src/CMakeLists.txt View File

@@ -1,12 +1,13 @@
cmake_minimum_required (VERSION 2.6)
project (libcbag)
include_directories("${PROJECT_SOURCE_DIR}/include")
include_directories("${PROJECT_SOURCE_DIR}/lib/")
include_directories("${PROJECT_SOURCE_DIR}/")
#include_directories("${PROJECT_SOURCE_DIR}/include")
#include_directories("${PROJECT_SOURCE_DIR}/lib/")
#include_directories("${PROJECT_SOURCE_DIR}/")
include_directories("include")
include_directories("lib/")
include (CheckSymbolExists)
include (CheckFunctionExists)

find_package(Boost 1.47 COMPONENTS filesystem unit_test_framework REQUIRED)
find_package(Boost 1.47 COMPONENTS filesystem REQUIRED)
message(status "** Boost Include: ${Boost_INCLUDE_DIR}")
message(status "** Boost Libraries: ${Boost_LIBRARY_DIRS}")
message(status "** Boost Libraries: ${Boost_LIBRARIES}")
@@ -20,13 +21,13 @@ include_directories(${OPENSSL_INCLUDE_DIR})
link_directories(${OPENSSL_LIBRARIES})

file( GLOB libcbag_SOURCES_LIB
"${PROJECT_SOURCE_DIR}/lib/*.cpp"
"lib/*.cpp"
)


file( GLOB libcbag_SOURCES_LIB
"${PROJECT_SOURCE_DIR}/lib/*.cpp"
)
#file( GLOB libcbag_SOURCES_LIB
# "${PROJECT_SOURCE_DIR}/lib/*.cpp"
# )



@@ -34,7 +35,9 @@ add_library(libcbag ${libcbag_SOURCES_LIB} )
target_include_directories(libcbag PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})


add_executable(test_payload ${PROJECT_SOURCE_DIR}/test/test_payload.cpp ${libcbag_SOURCES_lib})
#add_executable(test_payload ${PROJECT_SOURCE_DIR}/examples/test_payload.cpp ${libcbag_SOURCES_lib})
add_executable(test_payload examples/test_payload.cpp ${libcbag_SOURCES_lib})
TARGET_LINK_LIBRARIES(test_payload ${Boost_LIBRARIES} libcbag)
add_executable(test_bag ${PROJECT_SOURCE_DIR}/test/test_bag.cpp ${libcbag_SOURCES_lib})
#add_executable(test_bag ${PROJECT_SOURCE_DIR}/examples/test_bag.cpp ${libcbag_SOURCES_lib})
add_executable(test_bag examples/test_bag.cpp ${libcbag_SOURCES_lib})
TARGET_LINK_LIBRARIES(test_bag ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} libcbag)

Loading…
Cancel
Save