1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Improve tests CMake build files.

This commit is contained in:
Matias Fontanini
2015-04-25 17:26:02 -07:00
parent ae503523e4
commit 34bf1f23f7
3 changed files with 17 additions and 23 deletions

View File

@@ -1,12 +1,2 @@
IF(gtest_BINARY_DIR)
MESSAGE(STATUS "Using googletest git submodule.")
SET(GTEST_FOUND true)
ELSE()
FIND_PACKAGE(GTest)
ENDIF()
IF(GTEST_FOUND)
INCLUDE_DIRECTORIES(${gtest_INCLUDE_DIRS})
ADD_SUBDIRECTORY(src)
ELSE(GTEST_FOUND)
MESSAGE(WARNING "Google test not found. Tests disabled.")
ENDIF(GTEST_FOUND)
INCLUDE_DIRECTORIES(${gtest_INCLUDE_DIRS})
ADD_SUBDIRECTORY(src)

View File

@@ -3,6 +3,7 @@ INCLUDE_DIRECTORIES(
${PROJECT_SOURCE_DIR}/include/tins/
../include/
${gtest_SOURCE_DIR}/include
${PCAP_INCLUDE_DIR}
)
# Find pthread library
@@ -10,7 +11,6 @@ FIND_PACKAGE(Threads REQUIRED)
LINK_DIRECTORIES(
${gtest_BINARY_DIR}
)
# Link against GoogleTest, libtins and pthread.
# Pthread is required by GoogleTest
@@ -19,6 +19,7 @@ LINK_LIBRARIES(
gtest_main
tins
${CMAKE_THREAD_LIBS_INIT}
${PCAP_LIBRARY}
)
IF(LIBTINS_ENABLE_WPA2)