CMakeLists.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. cmake_minimum_required(VERSION 3.8)
  2. project(LotRO_Gi1dor_dat_library)
  3. set(CMAKE_CXX_STANDARD 11)
  4. set(PROJECT_BINARY_DIR bin)
  5. set(PROJECT_VERSION 0.1.0)
  6. set(CMAKE_OUTPUT_DIR ${CMAKE_SOURCE_DIR}/bin)
  7. set(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source)
  8. SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_OUTPUT_DIR})
  9. SET(LIBRARY_OUTPUT_PATH ${CMAKE_OUTPUT_DIR})
  10. set(SOURCE_FILES
  11. ${CMAKE_SOURCE_DIR}/Common/CommonFunctions.h
  12. ${CMAKE_SOURCE_DIR}/Common/DatException.h
  13. ${CMAKE_SOURCE_DIR}/LotroDatPatcher.h
  14. ${CMAKE_SOURCE_DIR}/DatFile/DatFile.cpp
  15. ${CMAKE_SOURCE_DIR}/DatFile/DatFile.h
  16. ${CMAKE_SOURCE_DIR}/BinaryData/BinaryData.cpp
  17. ${CMAKE_SOURCE_DIR}/BinaryData/BinaryData.h
  18. ${CMAKE_SOURCE_DIR}/Database/Database.cpp
  19. ${CMAKE_SOURCE_DIR}/Database/Database.h
  20. ${CMAKE_SOURCE_DIR}/Subfiles/Subfile.cpp
  21. ${CMAKE_SOURCE_DIR}/Subfiles/Subfile.h
  22. ${CMAKE_SOURCE_DIR}/SubDirectory/SubDirectory.cpp
  23. ${CMAKE_SOURCE_DIR}/SubDirectory/SubDirectory.h
  24. ${CMAKE_SOURCE_DIR}/Common/SQLite/sqlite3.c
  25. ${CMAKE_SOURCE_DIR}/Common/SQLite/sqlite3.h
  26. )
  27. # STATIC LIBRARY
  28. add_library(LotroDat_static STATIC ${SOURCE_FILES})
  29. target_link_libraries(LotroDat_static ${CMAKE_SOURCE_DIR}/Common/ZLib/libzlibstatic.a)
  30. # SHARED LIBRARY
  31. add_library(LotroDat SHARED ${SOURCE_FILES})
  32. target_link_libraries(LotroDat ${CMAKE_SOURCE_DIR}/Common/ZLib/libzlibstatic.a)
  33. # FOR EXTRACTOR USE NEXT LINE
  34. add_executable(LotRO_dat_extract_tester ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/Tests/extract_test.cpp)
  35. target_link_libraries(LotRO_dat_extract_tester ${CMAKE_SOURCE_DIR}/Common/ZLib/libzlibstatic.a)
  36. # FOR PATCHER USE NEXT LINE
  37. add_executable(LotRO_dat_patch_tester ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/Tests/patch_test.cpp)
  38. target_link_libraries(LotRO_dat_patch_tester ${CMAKE_SOURCE_DIR}/Common/Zlib/libzlibstatic.a)