123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- cmake_minimum_required(VERSION 3.8)
- project(LotRO_dat_library)
- set(CMAKE_CXX_STANDARD 11)
- set(PROJECT_BINARY_DIR bin)
- set(PROJECT_VERSION 0.1.0)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS} -static" )
- set(CMAKE_OUTPUT_DIR ${CMAKE_SOURCE_DIR}/bin)
- set(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source)
- include_directories(${CMAKE_SOURCE_DIR}/Common/Yaml)
- 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.cpp
- ${CMAKE_SOURCE_DIR}/DatFile.h
- ${CMAKE_SOURCE_DIR}/BinaryData.cpp
- ${CMAKE_SOURCE_DIR}/BinaryData.h
- ${CMAKE_SOURCE_DIR}/Database.cpp
- ${CMAKE_SOURCE_DIR}/Database.h
- ${CMAKE_SOURCE_DIR}/Subfile.cpp
- ${CMAKE_SOURCE_DIR}/Subfile.h
- ${CMAKE_SOURCE_DIR}/SubDirectory.cpp
- ${CMAKE_SOURCE_DIR}/SubDirectory.h
- ${CMAKE_SOURCE_DIR}/Common/SQLite/sqlite3.c
- ${CMAKE_SOURCE_DIR}/Common/SQLite/sqlite3.h
- ${CMAKE_SOURCE_DIR}/Subfiles/TextSubfile.cpp
- ${CMAKE_SOURCE_DIR}/Subfiles/TextSubfile.h
- ${CMAKE_SOURCE_DIR}/Subfiles/JpgSubfile.cpp
- ${CMAKE_SOURCE_DIR}/Subfiles/JpgSubfile.h
- ${CMAKE_SOURCE_DIR}/Subfiles/DdsSubfile.cpp
- ${CMAKE_SOURCE_DIR}/Subfiles/DdsSubfile.h
- ${CMAKE_SOURCE_DIR}/Subfiles/OggSubfile.cpp
- ${CMAKE_SOURCE_DIR}/Subfiles/OggSubfile.h
- ${CMAKE_SOURCE_DIR}/Subfiles/FontSubfile.cpp
- ${CMAKE_SOURCE_DIR}/Subfiles/FontSubfile.h
- ${CMAKE_SOURCE_DIR}/Subfiles/WavSubfile.cpp
- ${CMAKE_SOURCE_DIR}/Subfiles/WavSubfile.h
- ${CMAKE_SOURCE_DIR}/Subfiles/UnknownSubfile.cpp
- ${CMAKE_SOURCE_DIR}/Subfiles/UnknownSubfile.h
- )
- # STATIC LIBRARY
- add_library(LotroDat_static STATIC ${SOURCE_FILES})
- target_link_libraries(LotroDat_static ${CMAKE_SOURCE_DIR}/Common/ZLib/libzlibstatic.a)
- target_link_libraries(LotroDat_static ${CMAKE_SOURCE_DIR}/Common/Yaml/libyaml-cpp.a)
- # SHARED LIBRARY
- add_library(LotroDat SHARED ${SOURCE_FILES})
- target_link_libraries(LotroDat ${CMAKE_SOURCE_DIR}/Common/ZLib/libzlibstatic.a)
- target_link_libraries(LotroDat_static ${CMAKE_SOURCE_DIR}/Common/Yaml/libyaml-cpp.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)
- target_link_libraries(LotroDat_static ${CMAKE_SOURCE_DIR}/Common/Yaml/libyaml-cpp.a)
- # FOR PATCHER USE NEXT LINE
- add_executable(LotRO_dat_pat_tester ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/Tests/patch_test.cpp)
- target_link_libraries(LotRO_dat_pat_tester ${CMAKE_SOURCE_DIR}/Common/Zlib/libzlibstatic.a)
- target_link_libraries(LotroDat_static ${CMAKE_SOURCE_DIR}/Common/Yaml/libyaml-cpp.a)
|