1. cmake_minimum_required(VERSION 2.8.0)
  2. set(lib_name glog)
  3. if(WIN32)
  4. set(header_files src/base/commandlineflags.h
  5. src/windows/config.h
  6. src/base/googleinit.h
  7. src/windows/glog/log_severity.h
  8. src/windows/glog/logging.h
  9. src/base/mutex.h
  10. src/windows/glog/raw_logging.h
  11. src/windows/glog/stl_logging.h
  12. src/utilities.h
  13. src/windows/glog/vlog_is_on.h
  14. src/windows/port.h)
  15. set(src_files src/logging.cc
  16. src/raw_logging.cc
  17. src/utilities.cc
  18. src/vlog_is_on.cc
  19. src/windows/port.cc)
  20. endif()
  21. if(UNIX)
  22. endif()
  23. if(WIN32)
  24. include_directories(src/windows)
  25. endif()
  26. if(build_shared_lib)
  27. add_definitions(-DLIBGLOG_EXPORTS)
  28. else()
  29. add_definitions(-DGOOGLE_GLOG_DLL_DECL=)
  30. endif()
  31. if(build_shared_lib)
  32. install(TARGETS ${lib_name}
  33. RUNTIME DESTINATION ${bin_dir}/Debug
  34. LIBRARY DESTINATION ${bin_dir}/Debug
  35. CONFIGURATIONS Debug)
  36. install(TARGETS ${lib_name}
  37. RUNTIME DESTINATION ${bin_dir}/Release
  38. LIBRARY DESTINATION ${bin_dir}/Release
  39. CONFIGURATIONS Release)
  40. endif()