cmake_minimum_required(VERSION 3.8) project(LotRO_Gi1dor_dat_library) set(CMAKE_CXX_STANDARD 11) set(PROJECT_BINARY_DIR bin) set(PROJECT_VERSION 0.1.0) set(CMAKE_OUTPUT_DIR ${CMAKE_SOURCE_DIR}/bin) set(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_OUTPUT_DIR}) SET(LIBRARY_OUTPUT_PATH ${CMAKE_OUTPUT_DIR}) set(SOURCE_FILES ${CMAKE_SOURCE_DIR}/Common/CommonFunctions.h ${CMAKE_SOURCE_DIR}/Common/DatException.h ${CMAKE_SOURCE_DIR}/LotroDatPatcher.h ${CMAKE_SOURCE_DIR}/DatFile/DatFile.cpp ${CMAKE_SOURCE_DIR}/DatFile/DatFile.h ${CMAKE_SOURCE_DIR}/BinaryData/BinaryData.cpp ${CMAKE_SOURCE_DIR}/BinaryData/BinaryData.h ${CMAKE_SOURCE_DIR}/Database/Database.cpp ${CMAKE_SOURCE_DIR}/Database/Database.h ${CMAKE_SOURCE_DIR}/Subfiles/Subfile.cpp ${CMAKE_SOURCE_DIR}/Subfiles/Subfile.h ${CMAKE_SOURCE_DIR}/SubDirectory/SubDirectory.cpp ${CMAKE_SOURCE_DIR}/SubDirectory/SubDirectory.h ${CMAKE_SOURCE_DIR}/Common/SQLite/sqlite3.c ${CMAKE_SOURCE_DIR}/Common/SQLite/sqlite3.h ) # STATIC LIBRARY add_library(LotroDat_static STATIC ${SOURCE_FILES}) target_link_libraries(LotroDat_static ${CMAKE_SOURCE_DIR}/Common/ZLib/libzlibstatic.a) # SHARED LIBRARY add_library(LotroDat SHARED ${SOURCE_FILES}) target_link_libraries(LotroDat ${CMAKE_SOURCE_DIR}/Common/ZLib/libzlibstatic.a) # FOR EXTRACTOR USE NEXT LINE add_executable(LotRO_dat_extract_tester ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/Tests/extract_test.cpp) target_link_libraries(LotRO_dat_extract_tester ${CMAKE_SOURCE_DIR}/Common/ZLib/libzlibstatic.a) # FOR PATCHER USE NEXT LINE add_executable(LotRO_dat_patch_tester ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/Tests/patch_test.cpp) target_link_libraries(LotRO_dat_patch_tester ${CMAKE_SOURCE_DIR}/Common/Zlib/libzlibstatic.a)