Merge branch 'develop'

This commit is contained in:
JackCarterSmith 2021-10-19 19:53:19 +02:00
commit 7e955457ca
Signed by: JackCarterSmith
GPG Key ID: DB362B740828F843
4 changed files with 417 additions and 201 deletions

View File

@ -1,12 +1,14 @@
# CMakeLists.txt
# Written by JackCarterSmith, 2020
# Written by JackCarterSmith, 2021
# This code is released under the RSE license.
cmake_minimum_required(VERSION 3.1)
cmake_policy(VERSION 3.1)
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
# define project
#add_definitions(-DCONF_NO_GL)
if(DEFINED ENV{CI})
project(rse-texture VERSION 1.0.1.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Texture" LANGUAGES C)
set(RSE_TEX_NAME $ENV{CI_OUTPUT_NAME}-${PROJECT_VERSION})
@ -18,18 +20,20 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_SOURC
include(CheckIncludeFile)
include(CheckCSourceCompiles)
#include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
#conan_basic_setup()
# needed packages
find_package(ZLIB REQUIRED)
find_package(ZLIB 1.2.11 EXACT REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
find_package(PNG REQUIRED)
find_package(PNG 1.6.37 EXACT REQUIRED)
include_directories(${PNG_INCLUDE_DIR})
# define src/headers files
FILE(GLOB RSE_TEX_SRCS src/*.c)
FILE(GLOB RSE_TEX_HRDS src/*.h)
FILE(GLOB_RECURSE RSE_TEX_SRCS src/*.c)
FILE(GLOB_RECURSE RSE_TEX_HRDS src/*.h)
SOURCE_GROUP("Source Files" FILES ${RSE_TEX_SRCS})
SOURCE_GROUP("Header Files" FILES ${RSE_TEX_HRDS})
@ -42,7 +46,7 @@ add_executable(rse-texture ${RSE_TEX_SRCS} ${RSE_TEX_HRDS})
set_target_properties(rse-texture PROPERTIES OUTPUT_NAME ${RSE_TEX_NAME})
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(rse-texture PROPERTIES PREFIX "lib")
#set_target_properties(rse-texture PROPERTIES PREFIX "lib")
set_target_properties(rse-texture PROPERTIES IMPORT_PREFIX "lib")
endif()
target_link_libraries(rse-texture ${ZLIB_LIBRARIES} ${PNG_LIBRARIES})

570
Doxyfile

File diff suppressed because it is too large Load Diff

View File

@ -43,8 +43,8 @@ Necessary libs (provided only in windows release) for running and for compiling.
### Compiling
You can compile on both Windows (MinGW) or native Linux system thanks to CMake, you only need to adjust your dependencies on Windows.
zlib (zlib1g) and libpng16 distrib packages can be used on debian/ubuntu.
You can compile on both Windows (MinGW) or native Linux system thanks to CMake, you only need to adjust your dependencies on Windows or use Conan packages manager (https://conan.io).
zlib-dev (zlib1g-dev) and libpng16-dev distrib packages can be used on debian/ubuntu.
To compile, just clone and launch cmake:
@ -54,7 +54,17 @@ make
make install
```
On Windows system, you will probably need to specify the dependency flags for CMake. Ex:
On Windows system, I can suggest you to use Conan support to help you with dependencies:
```shell
mkdir build
cd build
conan install .. --build=libpng --build=zlib
cmake .. -G "MinGW Makefiles"
make
```
If you want to do it manually without Conan support, you will probably need to specify the dependency flags for CMake. Ex:
`cmake.exe -D"ZLIB_INCLUDE_DIR=zlib/1.2.11/include" -D"ZLIB_LIBRARY=zlib/1.2.11/lib/libzlib.dll.a" -D"PNG_PNG_INCLUDE_DIR=libpng/1.6.37/include" -D"PNG_LIBRARY=libpng/1.6.37/lib/libpng.dll.a" . -G "MinGW Makefiles"`

14
conanfile.txt Normal file
View File

@ -0,0 +1,14 @@
[requires]
zlib/1.2.11
libpng/1.6.37
[generators]
cmake
cmake_find_package
[options]
zlib:shared=True
libpng:shared=True
[imports]
bin, *.dll -> .