comparison Resources/CMake/GoogleLogConfiguration.cmake @ 930:27d256e0b458 mac

integration mainline -> mac
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 24 Jun 2014 16:47:18 +0200
parents cecce673f22f 816dccaeb7cf
children 29174c7b4631
comparison
equal deleted inserted replaced
928:882833632b1f 930:27d256e0b458
27 set(ac_google_namespace google) 27 set(ac_google_namespace google)
28 set(ac_google_start_namespace "namespace google {") 28 set(ac_google_start_namespace "namespace google {")
29 set(ac_google_end_namespace "}") 29 set(ac_google_end_namespace "}")
30 30
31 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR 31 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
32 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 32 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
33 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD")
33 set(ac_cv_have_unistd_h 1) 34 set(ac_cv_have_unistd_h 1)
34 set(ac_cv_have_stdint_h 1) 35 set(ac_cv_have_stdint_h 1)
35 set(ac_cv_have_systypes_h 0) 36 set(ac_cv_have_systypes_h 0)
36 set(ac_cv_have_inttypes_h 0) 37 set(ac_cv_have_inttypes_h 0)
37 set(ac_cv_have_libgflags 0) 38 set(ac_cv_have_libgflags 0)
83 WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src/windows 84 WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src/windows
84 ) 85 )
85 endif() 86 endif()
86 87
87 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR 88 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
88 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 89 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
90 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD")
89 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") 91 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
90 # Install the specific configuration for LSB SDK 92 # Install the specific configuration for LSB SDK
91 configure_file( 93 configure_file(
92 ${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleLogConfigurationLSB.h 94 ${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleLogConfigurationLSB.h
93 ${GOOGLE_LOG_SOURCES_DIR}/src/config.h 95 ${GOOGLE_LOG_SOURCES_DIR}/src/config.h
136 138
137 if (${CMAKE_COMPILER_IS_GNUCXX}) 139 if (${CMAKE_COMPILER_IS_GNUCXX})
138 # This is a patch for MinGW64 140 # This is a patch for MinGW64
139 add_definitions(-D_TIME_H__S=1) 141 add_definitions(-D_TIME_H__S=1)
140 endif() 142 endif()
141
142 endif() 143 endif()
143
144
145 144
146 add_library(GoogleLog STATIC ${GOOGLE_LOG_SOURCES}) 145 add_library(GoogleLog STATIC ${GOOGLE_LOG_SOURCES})
147 link_libraries(GoogleLog) 146 set(STATIC_GOOGLE_LOG GoogleLog)
148 147
149 else() 148 else()
150 CHECK_INCLUDE_FILE_CXX(glog/logging.h HAVE_GOOGLE_LOG_H) 149 CHECK_INCLUDE_FILE_CXX(glog/logging.h HAVE_GOOGLE_LOG_H)
151 if (NOT HAVE_GOOGLE_LOG_H) 150 if (NOT HAVE_GOOGLE_LOG_H)
152 message(FATAL_ERROR "Please install the libgoogle-glog-dev package") 151 message(FATAL_ERROR "Please install the libgoogle-glog-dev package")