CMakeLists.txt 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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}/include
  7. ${CMAKE_CURRENT_SOURCE_DIR}
  8. ${ZLIB_INCLUDE_DIRS}
  9. )
  10. # define header and source files for the library
  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/scummv6/codegen.h
  38. include/decompiler/scummv6/disassembler.h
  39. include/decompiler/scummv6/engine.h
  40. include/decompiler/field/ff7_field_disassembler.h
  41. include/decompiler/field/ff7_field_engine.h
  42. include/decompiler/field/ff7_field_codegen.h
  43. #include/decompiler/world/ff7_world_disassembler.h
  44. #include/decompiler/world/ff7_world_engine.h
  45. #include/decompiler/world/ff7_world_codegen.h
  46. include/common/algorithm.h
  47. include/common/noncopyable.h
  48. include/common/scummsys.h
  49. include/common/str.h
  50. include/common/util.h
  51. include/common/binaryreader.h
  52. include/common/lzs.h
  53. include/common/make_unique.h
  54. )
  55. set(SOURCE_FILES
  56. ./src/common/Logger.cpp
  57. ./src/common/BinGZipFile.cpp
  58. ./src/common/DrawSkeleton.cpp
  59. ./src/common/Surface.cpp
  60. ./src/common/OgreGenUtilites.cpp
  61. ./src/common/FontFile.cpp
  62. ./src/common/TimToVram.cpp
  63. ./src/common/Vram.cpp
  64. ./src/common/OgreBase.cpp
  65. ./src/VGearsUtility.cpp
  66. src/decompiler/sudm.cpp
  67. src/decompiler/decompiler_codegen.cpp
  68. src/decompiler/control_flow.cpp
  69. src/decompiler/decompiler_disassembler.cpp
  70. src/decompiler/graph.cpp
  71. src/decompiler/instruction.cpp
  72. src/decompiler/simple_disassembler.cpp
  73. src/decompiler/unknown_opcode_exception.cpp
  74. src/decompiler/value.cpp
  75. src/decompiler/scummv6/codegen.cpp
  76. src/decompiler/scummv6/disassembler.cpp
  77. src/decompiler/scummv6/engine.cpp
  78. src/decompiler/field/ff7_field_disassembler.cpp
  79. src/decompiler/field/ff7_field_engine.cpp
  80. src/decompiler/field/ff7_field_codegen.cpp
  81. #src/decompiler/world/ff7_world_disassembler.cpp
  82. #src/decompiler/world/ff7_world_engine.cpp
  83. #src/decompiler/world/ff7_world_codegen.cpp
  84. src/common/str.cpp
  85. )
  86. # For SUDM
  87. if (UNIX)
  88. add_definitions(-DPOSIX)
  89. endif()
  90. add_library(Utility STATIC
  91. ${HEADER_FILES}
  92. ${SOURCE_FILES}
  93. )
  94. target_link_libraries(Utility
  95. ${OGRE_LIBRARIES}
  96. ${OIS_LIBRARIES}
  97. ${ZLIB_LIBRARIES}
  98. )
  99. SET_PROPERTY(TARGET Utility PROPERTY FOLDER "utilities")
  100. #add_subdirectory(flevel)
  101. #add_subdirectory(lzs)
  102. #add_subdirectory(v-gears-launcher)
  103. #DEBUG, no optimizations
  104. #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -rdynamic -O0")
  105. find_package ( Qt5Widgets REQUIRED )
  106. #include ( ${QT_USE_FILE} )
  107. include_directories (
  108. ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
  109. ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
  110. )
  111. set ( v-gears-launcher_HDRS
  112. include/mainwindow.h
  113. include/ff7DataInstaller.h
  114. include/ff7FieldTextWriter.h
  115. )
  116. set ( v-gears-launcher_SRCS
  117. src/main.cpp
  118. src/mainwindow.cpp
  119. src/ff7DataInstaller.cpp
  120. src/ff7FieldTextWriter.cpp
  121. )
  122. set ( v-gears-launcher_UIS
  123. src/mainwindow.ui
  124. )
  125. QT5_WRAP_UI(UIS ${v-gears-launcher_UIS})
  126. message(UIS: ${UIS})
  127. set ( v-gears-launcher_MOCS
  128. include/mainwindow.h
  129. )
  130. QT5_WRAP_CPP(MOCS ${v-gears-launcher_MOCS})
  131. add_definitions(
  132. -DVGEARS_ADD_MANAGERS
  133. )
  134. add_executable ( v-gears-launcher ${v-gears-launcher_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS} )
  135. SET_PROPERTY(TARGET v-gears-launcher PROPERTY FOLDER "utilities")
  136. if (APPLE)
  137. target_link_libraries(v-gears-launcher "-framework CoreFoundation -framework Cocoa -framework IOKit")
  138. endif()
  139. if(WIN32)
  140. set_target_properties(v-gears-launcher PROPERTIES WIN32_EXECUTABLE ON)
  141. if (MSVC)
  142. set_target_properties(v-gears-launcher PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
  143. endif()
  144. endif()
  145. set(LIBRARIES
  146. Utility
  147. V-Gears
  148. v-gears-data
  149. #Sudm_Lib
  150. )
  151. find_package(Qt5 COMPONENTS Widgets REQUIRED)
  152. find_package(Qt5 COMPONENTS Core REQUIRED)
  153. #target_link_libraries ( v-gears-launcher ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${LIBRARIES} )
  154. target_link_libraries ( v-gears-launcher Qt5::Widgets Qt5::Core ${LIBRARIES} )
  155. if(WIN32 OR APPLE)
  156. install(TARGETS v-gears-launcher DESTINATION . )
  157. else()
  158. install(TARGETS v-gears-launcher RUNTIME DESTINATION bin )
  159. endif()