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

游戏引擎

开发平台:

C++ Builder

  1. # -*- cmake -*-
  2. project(llrender)
  3. include(00-Common)
  4. include(FindOpenGL)
  5. include(FreeType)
  6. include(LLCommon)
  7. include(LLImage)
  8. include(LLMath)
  9. include(LLRender)
  10. include(LLVFS)
  11. include(LLWindow)
  12. include(LLXML)
  13. include(LLVFS)
  14. include_directories(
  15.     ${FREETYPE_INCLUDE_DIRS}
  16.     ${LLCOMMON_INCLUDE_DIRS}
  17.     ${LLIMAGE_INCLUDE_DIRS}
  18.     ${LLMATH_INCLUDE_DIRS}
  19.     ${LLRENDER_INCLUDE_DIRS}
  20.     ${LLVFS_INCLUDE_DIRS}
  21.     ${LLWINDOW_INCLUDE_DIRS}
  22.     ${LLXML_INCLUDE_DIRS}
  23.     ${LLVFS_INCLUDE_DIRS}
  24.     )
  25. set(llrender_SOURCE_FILES
  26.     llcubemap.cpp
  27.     llfontfreetype.cpp
  28.     llfontgl.cpp
  29.     llfontbitmapcache.cpp
  30.     llfontregistry.cpp
  31.     llgldbg.cpp
  32.     llglslshader.cpp
  33.     llimagegl.cpp
  34.     llpostprocess.cpp
  35.     llrendersphere.cpp
  36.     llshadermgr.cpp
  37.     lltexture.cpp
  38.     llvertexbuffer.cpp
  39.     )
  40.     
  41. set(llrender_HEADER_FILES
  42.     CMakeLists.txt
  43.     llcubemap.h
  44.     llfontgl.h
  45.     llfontfreetype.h
  46.     llfontbitmapcache.h
  47.     llfontregistry.h
  48.     llgl.h
  49.     llgldbg.h
  50.     llglheaders.h
  51.     llglslshader.h
  52.     llglstates.h
  53.     llgltypes.h
  54.     llimagegl.h
  55.     llpostprocess.h
  56.     llrender.h
  57.     llrendersphere.h
  58.     llshadermgr.h
  59.     lltexture.h
  60.     llvertexbuffer.h
  61.     )
  62. set_source_files_properties(${llrender_HEADER_FILES}
  63.                             PROPERTIES HEADER_FILE_ONLY TRUE)
  64. list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES})
  65. if (SERVER AND NOT WINDOWS AND NOT DARWIN)
  66.   copy_server_sources(
  67.       llgl
  68.       llrender
  69.       )
  70.   set_source_files_properties(
  71.     ${server_SOURCE_FILES}
  72.     PROPERTIES
  73.     COMPILE_FLAGS "-DLL_MESA=1 -DLL_MESA_HEADLESS=1"
  74.     )
  75.   add_library (llrenderheadless
  76.     ${llrender_SOURCE_FILES}
  77.     ${server_SOURCE_FILES}
  78.     )
  79. else (SERVER AND NOT WINDOWS AND NOT DARWIN)
  80.   list(APPEND llrender_SOURCE_FILES
  81.       llgl.cpp
  82.       llrender.cpp
  83.       llrendertarget.cpp
  84.       )
  85. endif (SERVER AND NOT WINDOWS AND NOT DARWIN)
  86. add_library (llrender ${llrender_SOURCE_FILES})
  87. # Libraries on which this library depends, needed for Linux builds
  88. # Sort by high-level to low-level
  89. target_link_libraries(llrender 
  90.     llimage 
  91.     ${FREETYPE_LIBRARIES}
  92.     ${OPENGL_LIBRARIES})