CMakeLists.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. include_directories(
  2. ${VGears_INCLUDE_DIRS}
  3. ${VGears_SOURCE_DIR}/V-Gears/include
  4. ${VGears_SOURCE_DIR}/SupportedGames/FinalFantasy7/include
  5. ${CMAKE_CURRENT_SOURCE_DIR}/common/include
  6. ${CMAKE_CURRENT_SOURCE_DIR}
  7. ${ZLIB_INCLUDE_DIRS}
  8. )
  9. # define header and source files for the library
  10. set(HEADER_FILES
  11. ./common/FontFile.h
  12. ./common/include/QGearsUtility.h
  13. ./common/Logger.h
  14. ./common/Surface.h
  15. ./common/TimToVram.h
  16. ./common/BinGZipFile.h
  17. ./common/OgreBase.h
  18. ./common/OgreGenUtilites.h
  19. ./common/Vram.h
  20. ./common/DrawSkeleton.h
  21. )
  22. set(SOURCE_FILES
  23. ./common/Logger.cpp
  24. ./common/BinGZipFile.cpp
  25. ./common/DrawSkeleton.cpp
  26. ./common/Surface.cpp
  27. ./common/OgreGenUtilites.cpp
  28. ./common/FontFile.cpp
  29. ./common/TimToVram.cpp
  30. ./common/Vram.cpp
  31. ./common/OgreBase.cpp
  32. ./common/src/QGearsUtility.cpp
  33. )
  34. add_library(Utility STATIC
  35. ${HEADER_FILES}
  36. ${SOURCE_FILES}
  37. )
  38. target_link_libraries(Utility
  39. ${OGRE_LIBRARIES}
  40. ${OIS_LIBRARIES}
  41. ${ZLIB_LIBRARIES}
  42. )
  43. SET_PROPERTY(TARGET Utility PROPERTY FOLDER "utilities")
  44. add_subdirectory(flevel)
  45. add_subdirectory(lzs)
  46. #add_subdirectory(v-gears-launcher)
  47. find_package ( Qt5Widgets REQUIRED )
  48. #include ( ${QT_USE_FILE} )
  49. include_directories (
  50. ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
  51. ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
  52. )
  53. set ( v-gears-launcher_HDRS
  54. include/mainwindow.h
  55. include/ff7DataInstaller.h
  56. include/ff7FieldTextWriter.h
  57. )
  58. set ( v-gears-launcher_SRCS
  59. src/main.cpp
  60. src/mainwindow.cpp
  61. src/ff7DataInstaller.cpp
  62. src/ff7FieldTextWriter.cpp
  63. )
  64. set ( v-gears-launcher_UIS
  65. src/mainwindow.ui
  66. )
  67. QT5_WRAP_UI(UIS ${v-gears-launcher_UIS})
  68. message(UIS: ${UIS})
  69. set ( v-gears-launcher_MOCS
  70. include/mainwindow.h
  71. )
  72. QT5_WRAP_CPP(MOCS ${v-gears-launcher_MOCS})
  73. add_definitions(
  74. -DQGEARS_ADD_MANAGERS
  75. )
  76. add_executable ( v-gears-launcher ${v-gears-launcher_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS} )
  77. SET_PROPERTY(TARGET v-gears-launcher PROPERTY FOLDER "utilities")
  78. if (APPLE)
  79. target_link_libraries(v-gears-launcher "-framework CoreFoundation -framework Cocoa -framework IOKit")
  80. endif()
  81. if(WIN32)
  82. set_target_properties(v-gears-launcher PROPERTIES WIN32_EXECUTABLE ON)
  83. if (MSVC)
  84. set_target_properties(v-gears-launcher PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
  85. endif()
  86. endif()
  87. set(LIBRARIES
  88. Utility
  89. V-Gears
  90. v-gears-data
  91. Sudm_Lib
  92. )
  93. find_package(Qt5 COMPONENTS Widgets REQUIRED)
  94. find_package(Qt5 COMPONENTS Core REQUIRED)
  95. #target_link_libraries ( v-gears-launcher ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${LIBRARIES} )
  96. target_link_libraries ( v-gears-launcher Qt5::Widgets Qt5::Core ${LIBRARIES} )
  97. if(WIN32 OR APPLE)
  98. install(TARGETS v-gears-launcher DESTINATION . )
  99. else()
  100. install(TARGETS v-gears-launcher RUNTIME DESTINATION bin )
  101. endif()