- cmake_minimum_required(VERSION 2.8.0)
- set(lib_name glog)
- if(WIN32)
- set(header_files src/base/commandlineflags.h
- src/windows/config.h
- src/base/googleinit.h
- src/windows/glog/log_severity.h
- src/windows/glog/logging.h
- src/base/mutex.h
- src/windows/glog/raw_logging.h
- src/windows/glog/stl_logging.h
- src/utilities.h
- src/windows/glog/vlog_is_on.h
- src/windows/port.h)
- set(src_files src/logging.cc
- src/raw_logging.cc
- src/utilities.cc
- src/vlog_is_on.cc
- src/windows/port.cc)
- endif()
- if(UNIX)
- endif()
- if(WIN32)
- include_directories(src/windows)
- endif()
- if(build_shared_lib)
- add_definitions(-DLIBGLOG_EXPORTS)
- else()
- add_definitions(-DGOOGLE_GLOG_DLL_DECL=)
- endif()
- if(build_shared_lib)
- install(TARGETS ${lib_name}
- RUNTIME DESTINATION ${bin_dir}/Debug
- LIBRARY DESTINATION ${bin_dir}/Debug
- CONFIGURATIONS Debug)
- install(TARGETS ${lib_name}
- RUNTIME DESTINATION ${bin_dir}/Release
- LIBRARY DESTINATION ${bin_dir}/Release
- CONFIGURATIONS Release)
- endif()