Minor settings update
This commit is contained in:
parent
5728046d65
commit
5794e55e59
@ -1,57 +1,69 @@
|
||||
# CMakeLists.txt
|
||||
|
||||
# Written by JackCarterSmith, 2021
|
||||
####################################################
|
||||
# Written by JackCarterSmith, 2022
|
||||
# This code is released under the RSE license.
|
||||
####################################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_policy(VERSION 3.1)
|
||||
|
||||
# CMake requirement and general configuration
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
cmake_policy(VERSION 3.12)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
|
||||
|
||||
# define project
|
||||
add_definitions(-DCONF_NO_GL)
|
||||
if(DEFINED ENV{CI})
|
||||
project(rse-model VERSION $ENV{CI_VERSION}.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
||||
set(RSE_MOD_NAME $ENV{CI_OUTPUT_NAME}-${PROJECT_VERSION})
|
||||
else()
|
||||
project(rse-model VERSION 1.0.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
||||
set(RSE_MOD_NAME RSE_Model-${PROJECT_VERSION})
|
||||
if(DEFINED ENV{MS_COMPATIBLE})
|
||||
set(CMAKE_GNUtoMS ON) # Enable compatibility level to exported libraries
|
||||
endif()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h @ONLY)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
# needed packages
|
||||
add_definitions(-DCONF_NO_GL) # Used for obj-lib to not compile GL part
|
||||
|
||||
#find_package(GLEW REQUIRED)
|
||||
|
||||
# Project definition
|
||||
if(DEFINED ENV{CI}) # Jenkins CI integration mode
|
||||
project(rse-model VERSION $ENV{CI_VERSION}.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
||||
set(RSE_MOD_NAME $ENV{CI_OUTPUT_NAME}-${PROJECT_VERSION})
|
||||
else() # Standalone project mode, should not be used for release.
|
||||
project(rse-model VERSION 1.0.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
|
||||
set(RSE_MOD_NAME RSE_Model-${PROJECT_VERSION})
|
||||
endif()
|
||||
# Push compile infos to source
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h @ONLY)
|
||||
|
||||
|
||||
# Import needed packages and references their include path
|
||||
#find_package(GLEW REQUIRED) # Enable when GL rendering is ready
|
||||
#include_directories(${GLEW_INCLUDE_DIR})
|
||||
|
||||
# define src/headers files
|
||||
|
||||
FILE(GLOB_RECURSE RSE_MOD_SRCS src/*.c)
|
||||
FILE(GLOB_RECURSE RSE_MOD_HRDS src/*.h)
|
||||
SOURCE_GROUP("Source Files" FILES ${RSE_MOD_SRCS})
|
||||
SOURCE_GROUP("Header Files" FILES ${RSE_MOD_HRDS})
|
||||
# Define src/headers files
|
||||
FILE(GLOB_RECURSE RSE_MOD_SOURCES src/*.c)
|
||||
FILE(GLOB_RECURSE RSE_MOD_HEADERS src/*.h)
|
||||
SOURCE_GROUP("Source Files" FILES ${RSE_MOD_SOURCES})
|
||||
SOURCE_GROUP("Header Files" FILES ${RSE_MOD_HEADERS})
|
||||
|
||||
# begin building RSE-Model
|
||||
|
||||
#set(CMAKE_BUILD_TYPE Debug)
|
||||
# Building instructions for RSE-Model
|
||||
if(DEFINED ENV{RSE-WS})
|
||||
set(CMAKE_BUILD_TYPE DEBUG)
|
||||
endif()
|
||||
#include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_executable(rse-model ${RSE_MOD_SRCS} ${RSE_MOD_HRDS})
|
||||
#set_property(TARGET rse-model PROPERTY C_STANDARD 99)
|
||||
set_target_properties(rse-model PROPERTIES OUTPUT_NAME ${RSE_MOD_NAME})
|
||||
add_executable(rse-model ${RSE_MOD_SOURCES} ${RSE_MOD_HEADERS}) # Set the inputs for the compiler (srcs&hrds)
|
||||
set_property(TARGET rse-model PROPERTY C_STANDARD 90)
|
||||
set_target_properties(rse-model PROPERTIES OUTPUT_NAME ${RSE_MOD_NAME}) # Define the executable file name
|
||||
# Link externals libraries to the linker
|
||||
if(MSVC)
|
||||
# msvc does not append 'lib' - do it here to have consistent name
|
||||
#set_target_properties(rse-model PROPERTIES PREFIX "lib")
|
||||
set_target_properties(rse-model PROPERTIES IMPORT_PREFIX "lib")
|
||||
endif()
|
||||
if(MSVC)
|
||||
target_link_libraries(rse-model)
|
||||
target_link_libraries(rse-model ${GLEW_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(rse-model m)
|
||||
target_link_libraries(rse-model ${GLEW_LIBRARIES} m)
|
||||
endif()
|
||||
|
||||
# add GPG signature command
|
||||
|
||||
# GPG signature custom command
|
||||
#add_custom_command(
|
||||
# OUTPUT ""
|
||||
# COMMAND gpg --batch --detach-sign
|
||||
@ -61,7 +73,8 @@ endif()
|
||||
# VERBATIM
|
||||
#)
|
||||
|
||||
# install executable
|
||||
|
||||
# Install project executable
|
||||
install(TARGETS rse-model
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@ -47,8 +47,7 @@ pipeline {
|
||||
sh 'cp ../linux/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* .'
|
||||
}
|
||||
dir("zip_win") {
|
||||
// sh 'cp ../windows/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* ../windows/build/*.dll .'
|
||||
sh 'cp ../windows/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* .'
|
||||
sh 'cp ../windows/build/${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}* ../windows/build/*.dll .'
|
||||
}
|
||||
zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'x64.zip'
|
||||
sh 'mv x64.zip ${CI_OUTPUT_NAME}-${CI_VERSION}.${BUILD_NUMBER}_x64.zip'
|
||||
|
@ -11,7 +11,7 @@ All modules are independants. This is the **'MODEL'** module.
|
||||
|
||||
## MODEL MODULE
|
||||
|
||||
It's extract texture datas from Rogue Squadron 3D (PC) game models files (HOB).
|
||||
It's extract 3D rendering datas from Rogue Squadron 3D (PC) game models files (HOB).
|
||||
|
||||
This module can do:
|
||||
- Extract objects inside HOB files to Wavefront OBJ format,
|
||||
@ -21,7 +21,7 @@ This module can do:
|
||||
## TODO
|
||||
|
||||
- Add textures to models.
|
||||
- Discover all unknow fields, animation, bones mesh, etc.
|
||||
- Discover all unknowns fields, animations, bones mesh, etc.
|
||||
|
||||
### Using
|
||||
|
||||
@ -35,8 +35,9 @@ Due to issue with copyrights, I can't provide samples... You need to extract HOB
|
||||
### Options
|
||||
|
||||
- -h Print this message
|
||||
- -v Activate verbose output
|
||||
- -v,-vv Activate verbose/debug output mode respectively
|
||||
- -no-subdir Extract textures directly inside current folder
|
||||
- -no-mtl Disable materials datas export with OBJ model
|
||||
|
||||
### Dependencies
|
||||
|
||||
|
@ -8,4 +8,5 @@ cmake_find_package
|
||||
[options]
|
||||
glew:shared=True
|
||||
|
||||
[imports]
|
||||
[imports]
|
||||
bin, *.dll -> .
|
@ -118,9 +118,12 @@ static unsigned char checkInputArgs(T_PROG_OPTIONS* opt_ptr, int p_arg_nbr, char
|
||||
opt_ptr->verbose_mode = 1;
|
||||
printf("[OPTN] Verbose enabled.\n");
|
||||
} else if (strcmp(p_args[i], "-vv") == 0) {
|
||||
opt_ptr->verbose_mode = 1;
|
||||
opt_ptr->debug_mode = 1;
|
||||
printf("[OPTN] Debug enabled.\n");
|
||||
} else if (strcmp(p_args[i], "-vvv") == 0) {
|
||||
opt_ptr->verbose_mode = 1;
|
||||
opt_ptr->debug_mode = 1;
|
||||
opt_ptr->god_mode = 1;
|
||||
printf("[OPTN] God damn it!\n");
|
||||
} else if (strcmp(p_args[i], "-no-subdir") == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user