47 lines
935 B
CMake
47 lines
935 B
CMake
set(TARGET expkg)
|
|
project(${TARGET})
|
|
|
|
add_subdirectory(vendor/lz4/build/cmake)
|
|
|
|
file(GLOB_RECURSE SRC_SOURCE src/**.cpp vendor/gif-h/gif.h)
|
|
|
|
file(GLOB STB_SOURCE vendor/stb/*.cpp)
|
|
|
|
if(MSVC)
|
|
add_compile_options(/utf-8)
|
|
endif()
|
|
|
|
|
|
# static
|
|
add_library(expkg-static STATIC
|
|
${SRC_SOURCE}
|
|
${STB_SOURCE}
|
|
)
|
|
|
|
target_link_libraries(expkg-static PRIVATE lz4)
|
|
|
|
target_include_directories(expkg-static PRIVATE vendor/stb vendor/gif-h)
|
|
|
|
target_include_directories(expkg-static PUBLIC src)
|
|
|
|
|
|
# shared
|
|
add_library(expkg-shared SHARED
|
|
${SRC_SOURCE}
|
|
${STB_SOURCE}
|
|
)
|
|
|
|
set_target_properties(expkg-shared PROPERTIES
|
|
OUTPUT_NAME "expkg"
|
|
PREFIX ""
|
|
)
|
|
|
|
target_link_libraries(expkg-shared PRIVATE lz4)
|
|
target_compile_definitions(expkg-shared PRIVATE -DPKG_SHARED -DPKG_BUILD_DLL)
|
|
|
|
target_include_directories(expkg-shared PRIVATE vendor/stb vendor/gif-h)
|
|
|
|
target_include_directories(expkg-shared PUBLIC src)
|
|
|
|
|