AIS: message 17 added.
[marnav.git] / cmake / ExternGmock.cmake
blobd8c2ee0671dba6b51ede753d11fd32015d8e78bc
1 message(STATUS "Extern: gmock 1.7.0")
3 set(gmock_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/local")
4 set(gmock_INCLUDE_DIR "${gmock_INSTALL_DIR}/include")
5 set(gmock_LIBRARY_DIR "${gmock_INSTALL_DIR}/lib")
7 ExternalProject_Add(extern_gmock
8         PREFIX "${CMAKE_CURRENT_BINARY_DIR}/gmock"
9         SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/gmock-1.7.0"
10         # configure
11         CMAKE_ARGS
12                 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
13                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
14                 -DCMAKE_INSTALL_PREFIX=${gmock_INSTALL_DIR}
15                 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
16         # install
17         INSTALL_DIR ${gmock_INSTALL_DIR}
18         )
20 add_library(gmock STATIC IMPORTED)
21 set_target_properties(gmock
22         PROPERTIES
23                 IMPORTED_LOCATION
24                         ${gmock_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}
25         )
26 add_dependencies(gmock extern_gmock)
27 include_directories(${gmock_INCLUDE_DIR})