CMakeLists.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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/VGearsUtility.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/VGearsUtility.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. #DEBUG, no optimizations
  48. #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -rdynamic -O0")
  49. find_package ( Qt5Widgets REQUIRED )
  50. #include ( ${QT_USE_FILE} )
  51. include_directories (
  52. ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
  53. ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
  54. )
  55. set ( v-gears-launcher_HDRS
  56. include/mainwindow.h
  57. include/ff7DataInstaller.h
  58. include/ff7FieldTextWriter.h
  59. )
  60. set ( v-gears-launcher_SRCS
  61. src/main.cpp
  62. src/mainwindow.cpp
  63. src/ff7DataInstaller.cpp
  64. src/ff7FieldTextWriter.cpp
  65. )
  66. set ( v-gears-launcher_UIS
  67. src/mainwindow.ui
  68. )
  69. QT5_WRAP_UI(UIS ${v-gears-launcher_UIS})
  70. message(UIS: ${UIS})
  71. set ( v-gears-launcher_MOCS
  72. include/mainwindow.h
  73. )
  74. QT5_WRAP_CPP(MOCS ${v-gears-launcher_MOCS})
  75. add_definitions(
  76. -DVGEARS_ADD_MANAGERS
  77. )
  78. add_executable ( v-gears-launcher ${v-gears-launcher_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS} )
  79. SET_PROPERTY(TARGET v-gears-launcher PROPERTY FOLDER "utilities")
  80. if (APPLE)
  81. target_link_libraries(v-gears-launcher "-framework CoreFoundation -framework Cocoa -framework IOKit")
  82. endif()
  83. if(WIN32)
  84. set_target_properties(v-gears-launcher PROPERTIES WIN32_EXECUTABLE ON)
  85. if (MSVC)
  86. set_target_properties(v-gears-launcher PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
  87. endif()
  88. endif()
  89. set(LIBRARIES
  90. Utility
  91. V-Gears
  92. v-gears-data
  93. Sudm_Lib
  94. )
  95. find_package(Qt5 COMPONENTS Widgets REQUIRED)
  96. find_package(Qt5 COMPONENTS Core REQUIRED)
  97. #target_link_libraries ( v-gears-launcher ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${LIBRARIES} )
  98. target_link_libraries ( v-gears-launcher Qt5::Widgets Qt5::Core ${LIBRARIES} )
  99. if(WIN32 OR APPLE)
  100. install(TARGETS v-gears-launcher DESTINATION . )
  101. else()
  102. install(TARGETS v-gears-launcher RUNTIME DESTINATION bin )
  103. endif()