CMakeLists.txt
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:2k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. # -*- cmake -*-
  2. project(win_crash_logger)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(LLCrashLogger)
  6. include(LLMath)
  7. include(LLMessage)
  8. include(LLVFS)
  9. include(LLWindow)
  10. include(LLXML)
  11. include(Linking)
  12. include(LLSharedLibs)
  13. include_directories(
  14.     ${LLCOMMON_INCLUDE_DIRS}
  15.     ${LLCRASHLOGGER_INCLUDE_DIRS}
  16.     ${LLMATH_INCLUDE_DIRS}
  17.     ${LLWINDOW_INCLUDE_DIRS}
  18.     ${LLXML_INCLUDE_DIRS}
  19.     ${LLVFS_INCLUDE_DIRS}
  20.     )
  21. set(win_crash_logger_SOURCE_FILES
  22.     win_crash_logger.cpp
  23.     llcrashloggerwindows.cpp
  24.     )
  25. set(win_crash_logger_HEADER_FILES
  26.     CMakeLists.txt
  27.     llcrashloggerwindows.h
  28.     resource.h
  29.     StdAfx.h
  30.     win_crash_logger.h
  31.     )
  32. set_source_files_properties(${win_crash_logger_HEADER_FILES}
  33.                             PROPERTIES HEADER_FILE_ONLY TRUE)
  34. set(win_crash_logger_RESOURCE_FILES
  35.     ll_icon.ico
  36.     )
  37. set_source_files_properties(${win_crash_logger_RESOURCE_FILES}
  38.                             PROPERTIES HEADER_FILE_ONLY TRUE)
  39. set(win_crash_logger_RESOURCE_FILES 
  40.     win_crash_logger.rc
  41.     ${win_crash_logger_RESOURCE_FILES}
  42.     )
  43. SOURCE_GROUP("Resource Files" FILES ${win_crash_logger_RESOURCE_FILES})
  44. list(APPEND 
  45.     win_crash_logger_SOURCE_FILES 
  46.     ${win_crash_logger_HEADER_FILES} 
  47.     ${win_crash_logger_RESOURCE_FILES}
  48.     )
  49. find_library(DXGUID_LIBRARY dxguid ${DIRECTX_LIBRARY_DIR})
  50. add_executable(windows-crash-logger WIN32 ${win_crash_logger_SOURCE_FILES})
  51. target_link_libraries(windows-crash-logger
  52.     ${LLCRASHLOGGER_LIBRARIES}
  53.     ${LLWINDOW_LIBRARIES}
  54.     ${LLVFS_LIBRARIES}
  55.     ${LLXML_LIBRARIES}
  56.     ${LLMESSAGE_LIBRARIES}
  57.     ${LLMATH_LIBRARIES}
  58.     ${LLCOMMON_LIBRARIES}
  59.     ${WINDOWS_LIBRARIES}
  60.     ${DXGUID_LIBRARY}
  61.     ${GOOGLE_PERFTOOLS_LIBRARIES}
  62.     user32
  63.     gdi32
  64.     ole32
  65.     oleaut32
  66.     Wldap32
  67.     )
  68.     
  69. if (WINDOWS)
  70.     set_target_properties(windows-crash-logger
  71.         PROPERTIES 
  72.         LINK_FLAGS "/NODEFAULTLIB:LIBCMT"
  73.         LINK_FLAGS_DEBUG "/NODEFAULTLIB:"LIBCMT;LIBCMTD;MSVCRT""
  74.         )
  75. endif (WINDOWS)
  76. ll_deploy_sharedlibs_command(windows-crash-logger)