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

游戏引擎

开发平台:

C++ Builder

  1. # -*- cmake -*-
  2. project(llvfs)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(UnixInstall)
  6. include_directories(
  7.     ${LLCOMMON_INCLUDE_DIRS}
  8.     )
  9. set(llvfs_SOURCE_FILES
  10.     lldir.cpp
  11.     lllfsthread.cpp
  12.     llpidlock.cpp
  13.     llvfile.cpp
  14.     llvfs.cpp
  15.     llvfsthread.cpp
  16.     )
  17. set(llvfs_HEADER_FILES
  18.     CMakeLists.txt
  19.     lldir.h
  20.     lldirguard.h
  21.     lllfsthread.h
  22.     llpidlock.h
  23.     llvfile.h
  24.     llvfs.h
  25.     llvfsthread.h
  26.     )
  27. if (DARWIN)
  28.   LIST(APPEND llvfs_SOURCE_FILES lldir_mac.cpp)
  29.   LIST(APPEND llvfs_HEADER_FILES lldir_mac.h)
  30. endif (DARWIN)
  31. if (LINUX)
  32.   LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp)
  33.   LIST(APPEND llvfs_HEADER_FILES lldir_linux.h)
  34.   if (VIEWER AND INSTALL)
  35.     set_source_files_properties(lldir_linux.cpp
  36.                                 PROPERTIES COMPILE_FLAGS
  37.                                 "-DAPP_RO_DATA_DIR=\"${APP_SHARE_DIR}\""
  38.                                 )
  39.   endif (VIEWER AND INSTALL)
  40. endif (LINUX)
  41. if (WINDOWS)
  42.   LIST(APPEND llvfs_SOURCE_FILES lldir_win32.cpp)
  43.   LIST(APPEND llvfs_HEADER_FILES lldir_win32.h)
  44. endif (WINDOWS)
  45. set_source_files_properties(${llvfs_HEADER_FILES}
  46.                             PROPERTIES HEADER_FILE_ONLY TRUE)
  47. list(APPEND llvfs_SOURCE_FILES ${llvfs_HEADER_FILES})
  48. add_library (llvfs ${llvfs_SOURCE_FILES})
  49. if (DARWIN)
  50.   include(CMakeFindFrameworks)
  51.   find_library(CARBON_LIBRARY Carbon)
  52.   target_link_libraries(llvfs ${CARBON_LIBRARY})
  53. endif (DARWIN)
  54. # Add tests
  55. include(LLAddBuildTest)
  56. # UNIT TESTS
  57. SET(llvfs_TEST_SOURCE_FILES
  58.   # none so far
  59.   )
  60. LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}")
  61. # INTEGRATION TESTS
  62. set(test_libs llmath llcommon llvfs ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
  63. # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
  64. LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}")