|
@@ -16,57 +16,41 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
|
|
|
|
|
-set(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/src)
|
|
|
-
|
|
|
-include_directories(${CMAKE_SOURCE_DIR}/Common/Yaml)
|
|
|
+include_directories(${CMAKE_SOURCE_DIR}/include)
|
|
|
+include_directories(${CMAKE_SOURCE_DIR}/Third-party/Yaml)
|
|
|
+include_directories(${CMAKE_SOURCE_DIR}/Third-party/SQLite)
|
|
|
+include_directories(${CMAKE_SOURCE_DIR}/Third-party/Zlib)
|
|
|
|
|
|
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}/src/DatFile.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/BinaryData.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/BinaryData.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/BinaryData.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Database.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/Database.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/Database.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfile.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfile.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/Subfile.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/SubDirectory.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/SubDirectory.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/SubDirectory.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Common/SQLite/sqlite3.c
|
|
|
- ${CMAKE_SOURCE_DIR}/Common/SQLite/sqlite3.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/Third-party/SQLite/sqlite3.c
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/TextSubfile.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/TextSubfile.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/Subfiles/TextSubfile.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/JpgSubfile.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/JpgSubfile.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/Subfiles/JpgSubfile.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/DdsSubfile.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/DdsSubfile.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/Subfiles/DdsSubfile.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/OggSubfile.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/OggSubfile.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/Subfiles/OggSubfile.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/FontSubfile.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/FontSubfile.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/Subfiles/FontSubfile.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/WavSubfile.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/WavSubfile.h
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/Subfiles/WavSubfile.cpp
|
|
|
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/UnknownSubfile.cpp
|
|
|
- ${CMAKE_SOURCE_DIR}/Subfiles/UnknownSubfile.h
|
|
|
- src/SubfileData.h)
|
|
|
+ ${CMAKE_SOURCE_DIR}/src/Subfiles/UnknownSubfile.cpp
|
|
|
+)
|
|
|
|
|
|
set(CompilerFlags
|
|
|
CMAKE_CXX_FLAGS
|
|
@@ -90,18 +74,18 @@ add_library(LotroDat_static STATIC ${SOURCE_FILES})
|
|
|
# SHARED LIBRARY
|
|
|
add_library(LotroDat SHARED ${SOURCE_FILES})
|
|
|
# CONSOLE EXTRACTOR TOOL
|
|
|
-add_executable(LotRO_dat_extract_tester ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/Examples/extractor_example.cpp)
|
|
|
+add_executable(LotRO_dat_extract_tester ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/src/Examples/extractor_example.cpp)
|
|
|
# CONSOLE PATCHER TOOL
|
|
|
-add_executable(LotRO_dat_pat_tester ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/Examples/patcher_example.cpp)
|
|
|
+add_executable(LotRO_dat_pat_tester ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/src/Examples/patcher_example.cpp)
|
|
|
|
|
|
foreach(TARGET LotroDat_static LotroDat LotRO_dat_extract_tester LotRO_dat_pat_tester)
|
|
|
if(MSVC)
|
|
|
- target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Common/Zlib/zlibstatic.lib)
|
|
|
- target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Common/Yaml/libyaml-cppmt.lib)
|
|
|
+ target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Third-Party/Zlib/zlibstatic.lib)
|
|
|
+ target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Third-Party/Yaml/libyaml-cppmt.lib)
|
|
|
target_link_libraries(${TARGET} vcruntime.lib MSVCRT.lib)
|
|
|
else(MSVC)
|
|
|
- target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Common/Zlib/libzlibstatic.a)
|
|
|
- target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Common/Yaml/libyaml-cpp.a)
|
|
|
+ target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Third-Party/Zlib/libzlibstatic.a)
|
|
|
+ target_link_libraries(${TARGET} ${CMAKE_SOURCE_DIR}/Third-Party/Yaml/libyaml-cpp.a)
|
|
|
target_link_libraries(${TARGET} -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic)
|
|
|
endif(MSVC)
|
|
|
endforeach(TARGET LotroDat_static LotroDat LotRO_dat_extract_tester LotRO_dat_pat_tester)
|