mirror of
https://github.com/ModOrganizer2/libbsarch.git
synced 2026-07-27 14:06:31 -07:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72b5144510 | ||
|
|
4a88aab247 |
+9
-11
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.5..3.15)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
option(copy_dll_to_binary_dir "Will copy libbsarch DLL to the binary directory. May not work if libbsarch is used as a subproject" ON)
|
||||
|
||||
@@ -7,12 +7,11 @@ project(libbsarch CXX)
|
||||
|
||||
# Add library to build.
|
||||
add_library(libbsarch SHARED
|
||||
src/DDS.h
|
||||
src/libbsarch.h
|
||||
src/libbsarch.cpp
|
||||
src/libbsarch.def
|
||||
)
|
||||
|
||||
)
|
||||
target_include_directories(libbsarch PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/dds)
|
||||
target_compile_features(libbsarch PRIVATE cxx_std_11)
|
||||
|
||||
# Preprocessor definitions
|
||||
@@ -40,7 +39,7 @@ add_custom_command(TARGET libbsarch POST_BUILD
|
||||
# libbsarch_OOP #
|
||||
############################################################
|
||||
|
||||
find_package(Qt5 OPTIONAL_COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Core REQUIRED)
|
||||
|
||||
add_library(libbsarch_OOP STATIC
|
||||
src/base_types.hpp
|
||||
@@ -50,11 +49,9 @@ add_library(libbsarch_OOP STATIC
|
||||
src/bs_archive.h
|
||||
src/bs_archive_entries.cpp
|
||||
src/bs_archive_entries.h
|
||||
src/dds.h
|
||||
|
||||
src/libbsarch.hpp
|
||||
src/libbsarch.h
|
||||
src/dds.h
|
||||
|
||||
src/utils/convertible_string.cpp
|
||||
src/utils/convertible_string.hpp
|
||||
@@ -62,7 +59,8 @@ add_library(libbsarch_OOP STATIC
|
||||
src/utils/convertible_ostream.hpp
|
||||
src/utils/string_convert.cpp
|
||||
src/utils/string_convert.hpp
|
||||
)
|
||||
)
|
||||
target_include_directories(libbsarch_OOP PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/dds)
|
||||
|
||||
|
||||
## Copying the corresponding DLL ##
|
||||
@@ -95,9 +93,9 @@ if(copy_dll_to_binary_dir)
|
||||
endif()
|
||||
|
||||
#Adding Qt support
|
||||
if(Qt5_FOUND)
|
||||
message("libbsarch: Qt5 found, enabling Qt support")
|
||||
target_link_libraries(libbsarch_OOP PUBLIC Qt5::Core)
|
||||
if(Qt6_FOUND)
|
||||
message("libbsarch: Qt6 found, enabling Qt support")
|
||||
target_link_libraries(libbsarch_OOP PUBLIC Qt::Core)
|
||||
target_compile_definitions(libbsarch PUBLIC "QT")
|
||||
target_compile_definitions(libbsarch_OOP PUBLIC "QT")
|
||||
endif()
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "dds.h"
|
||||
#include <dxgiformat.h>
|
||||
#include <dds.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef BSARCH_DLL_EXPORT
|
||||
|
||||
Reference in New Issue
Block a user