CMakeLists.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. # Include directories.
  2. include_directories(
  3. ${VGears_INCLUDE_DIRS}
  4. ${VGears_SOURCE_DIR}/V-Gears/include
  5. ${VGears_SOURCE_DIR}/SupportedGames/FinalFantasy7/include
  6. ${CMAKE_CURRENT_SOURCE_DIR}/include
  7. ${CMAKE_CURRENT_SOURCE_DIR}
  8. ${ZLIB_INCLUDE_DIRS}
  9. )
  10. # Define headers and source files for the installer.
  11. set(HEADER_FILES
  12. include/common/FontFile.h
  13. include/VGearsUtility.h
  14. include/common/Logger.h
  15. include/common/Surface.h
  16. include/common/TimToVram.h
  17. include/common/BinGZipFile.h
  18. include/common/OgreBase.h
  19. include/common/OgreGenUtilites.h
  20. include/common/Vram.h
  21. include/common/DrawSkeleton.h
  22. include/common/Logger.h
  23. include/decompiler/sudm.h
  24. include/decompiler/decompiler_codegen.h
  25. include/decompiler/control_flow.h
  26. include/decompiler/decompiler_disassembler.h
  27. include/decompiler/decompiler_engine.h
  28. include/decompiler/graph.h
  29. include/decompiler/instruction.h
  30. include/decompiler/objectFactory.h
  31. include/decompiler/refcounted.h
  32. include/decompiler/simple_disassembler.h
  33. include/decompiler/stack.h
  34. include/decompiler/unknown_opcode_exception.h
  35. include/decompiler/value.h
  36. include/decompiler/wrongtype.h
  37. include/decompiler/field/instruction/FieldBackgroundInstruction.h
  38. include/decompiler/field/instruction/FieldCameraInstruction.h
  39. include/decompiler/field/instruction/FieldCondJumpInstruction.h
  40. include/decompiler/field/instruction/FieldControlFlowInstruction.h
  41. include/decompiler/field/instruction/FieldMathInstruction.h
  42. include/decompiler/field/instruction/FieldMediaInstruction.h
  43. include/decompiler/field/instruction/FieldModelInstruction.h
  44. include/decompiler/field/instruction/FieldModuleInstruction.h
  45. include/decompiler/field/instruction/FieldNoOperationInstruction.h
  46. include/decompiler/field/instruction/FieldPartyInstruction.h
  47. include/decompiler/field/instruction/FieldUncategorizedInstruction.h
  48. include/decompiler/field/instruction/FieldUncondJumpInstruction.h
  49. include/decompiler/field/instruction/FieldWalkmeshInstruction.h
  50. include/decompiler/field/instruction/FieldWindowInstruction.h
  51. include/decompiler/field/FieldDisassembler.h
  52. include/decompiler/field/FieldEngine.h
  53. include/decompiler/field/FieldCodeGenerator.h
  54. include/common/scummsys.h
  55. include/common/BinaryReader.h
  56. include/common/Lzs.h
  57. )
  58. set(SOURCE_FILES
  59. src/common/Logger.cpp
  60. src/common/BinGZipFile.cpp
  61. src/common/DrawSkeleton.cpp
  62. src/common/Surface.cpp
  63. src/common/OgreGenUtilites.cpp
  64. src/common/FontFile.cpp
  65. src/common/TimToVram.cpp
  66. src/common/Vram.cpp
  67. src/common/OgreBase.cpp
  68. src/VGearsUtility.cpp
  69. src/decompiler/sudm.cpp
  70. src/decompiler/decompiler_codegen.cpp
  71. src/decompiler/control_flow.cpp
  72. src/decompiler/decompiler_disassembler.cpp
  73. src/decompiler/graph.cpp
  74. src/decompiler/instruction.cpp
  75. src/decompiler/simple_disassembler.cpp
  76. src/decompiler/unknown_opcode_exception.cpp
  77. src/decompiler/value.cpp
  78. src/decompiler/field/instruction/FieldBackgroundInstruction.cpp
  79. src/decompiler/field/instruction/FieldCameraInstruction.cpp
  80. src/decompiler/field/instruction/FieldCondJumpInstruction.cpp
  81. src/decompiler/field/instruction/FieldControlFlowInstruction.cpp
  82. src/decompiler/field/instruction/FieldMathInstruction.cpp
  83. src/decompiler/field/instruction/FieldMediaInstruction.cpp
  84. src/decompiler/field/instruction/FieldModelInstruction.cpp
  85. src/decompiler/field/instruction/FieldModuleInstruction.cpp
  86. src/decompiler/field/instruction/FieldNoOperationInstruction.cpp
  87. src/decompiler/field/instruction/FieldPartyInstruction.cpp
  88. src/decompiler/field/instruction/FieldUncategorizedInstruction.cpp
  89. src/decompiler/field/instruction/FieldUncondJumpInstruction.cpp
  90. src/decompiler/field/instruction/FieldWalkmeshInstruction.cpp
  91. src/decompiler/field/instruction/FieldWindowInstruction.cpp
  92. src/decompiler/field/FieldDisassembler.cpp
  93. src/decompiler/field/FieldEngine.cpp
  94. src/decompiler/field/FieldCodeGenerator.cpp
  95. )
  96. # For SUDM. TODO: Add elses.
  97. if (UNIX)
  98. add_definitions(-DPOSIX)
  99. endif()
  100. add_library(Utility STATIC
  101. ${HEADER_FILES}
  102. ${SOURCE_FILES}
  103. )
  104. target_link_libraries(Utility
  105. ${OGRE_LIBRARIES}
  106. ${OIS_LIBRARIES}
  107. ${ZLIB_LIBRARIES}
  108. )
  109. SET_PROPERTY(TARGET Utility PROPERTY FOLDER "utilities")
  110. # DEBUG, no optimizations
  111. #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -rdynamic -O0")
  112. find_package ( Qt5Widgets REQUIRED )
  113. include_directories (
  114. ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
  115. ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
  116. )
  117. set ( v-gears-launcher_HDRS
  118. include/mainwindow.h
  119. include/ff7DataInstaller.h
  120. include/ff7FieldTextWriter.h
  121. )
  122. set(v-gears-launcher_SRCS
  123. src/main.cpp
  124. src/mainwindow.cpp
  125. src/ff7DataInstaller.cpp
  126. src/ff7FieldTextWriter.cpp
  127. )
  128. set(v-gears-launcher_UIS
  129. src/mainwindow.ui
  130. )
  131. QT5_WRAP_UI(UIS ${v-gears-launcher_UIS})
  132. message(UIS: ${UIS})
  133. set(v-gears-launcher_MOCS
  134. include/mainwindow.h
  135. )
  136. QT5_WRAP_CPP(MOCS ${v-gears-launcher_MOCS})
  137. add_definitions(-DVGEARS_ADD_MANAGERS)
  138. add_executable (v-gears-launcher ${v-gears-launcher_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS})
  139. SET_PROPERTY(TARGET v-gears-launcher PROPERTY FOLDER "utilities")
  140. if (APPLE)
  141. target_link_libraries(v-gears-launcher "-framework CoreFoundation -framework Cocoa -framework IOKit")
  142. endif()
  143. if(WIN32)
  144. set_target_properties(v-gears-launcher PROPERTIES WIN32_EXECUTABLE ON)
  145. if (MSVC)
  146. set_target_properties(v-gears-launcher PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
  147. endif()
  148. endif()
  149. set(LIBRARIES
  150. Utility
  151. V-Gears
  152. v-gears-data
  153. #Sudm_Lib
  154. )
  155. find_package(Qt5 COMPONENTS Widgets REQUIRED)
  156. find_package(Qt5 COMPONENTS Core REQUIRED)
  157. target_link_libraries ( v-gears-launcher Qt5::Widgets Qt5::Core ${LIBRARIES} )
  158. if(WIN32 OR APPLE)
  159. install(TARGETS v-gears-launcher DESTINATION .)
  160. else()
  161. install(TARGETS v-gears-launcher RUNTIME DESTINATION bin)
  162. endif()