Initialize shared Metin2 SDK with rendering optimizations and tests
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(texture LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
add_library(texture STATIC
|
||||
src/dxt.cpp
|
||||
src/tga.cpp
|
||||
src/sub_image.cpp
|
||||
)
|
||||
|
||||
target_include_directories(texture PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
add_library(texture::texture ALIAS texture)
|
||||
|
||||
option(TEXTURE_BUILD_TESTS "Build texture SDK tests" ON)
|
||||
if(TEXTURE_BUILD_TESTS)
|
||||
add_executable(texture_test tests/texture_test.cpp)
|
||||
target_link_libraries(texture_test PRIVATE texture)
|
||||
add_test(NAME texture_test COMMAND texture_test)
|
||||
endif()
|
||||
Reference in New Issue
Block a user