Pre-migration of conan manager to v2
This commit is contained in:
parent
d6b94f8c79
commit
d302d7ebd5
@ -7,8 +7,8 @@
|
||||
|
||||
|
||||
# CMake requirement and general configuration
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
cmake_policy(VERSION 3.12)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
cmake_policy(VERSION 3.15)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
|
||||
if(DEFINED ENV{MS_COMPATIBLE})
|
||||
set(CMAKE_GNUtoMS ON) # Enable compatibility level to exported libraries
|
||||
@ -24,7 +24,6 @@ else() # Standalone project mode, should not be used for release.
|
||||
set(RSE_TEXTURE_NAME RSETexture)
|
||||
endif()
|
||||
set(RSP_TEXTURE_LIB_NAME RSPTexture${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR})
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
|
||||
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
|
||||
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
|
||||
|
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -23,9 +23,9 @@ pipeline {
|
||||
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Texture'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Texture.git']]])
|
||||
sh 'git submodule update --init --recursive'
|
||||
dir("build") {
|
||||
rtConanRun(clientId: "conan", command: "install .. --build=missing")
|
||||
rtConanRun(clientId: "conan", command: "install .. -s build_type=Release -pr:h=default -pr:b=default --build=missing")
|
||||
}
|
||||
cmakeBuild buildDir: 'build', installation: 'latest', steps: [[args: 'all']]
|
||||
cmakeBuild buildDir: 'build', cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Release', installation: 'latest', steps: [[args: 'all']]
|
||||
}
|
||||
},
|
||||
windows: {
|
||||
@ -33,9 +33,9 @@ pipeline {
|
||||
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Terrain'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Texture.git']]])
|
||||
sh 'git submodule update --init --recursive'
|
||||
dir("build") {
|
||||
rtConanRun(clientId: "conan", command: "install .. -pr:b=default -pr:h=windows --build=missing")
|
||||
rtConanRun(clientId: "conan", command: "install .. -s build_type=Release -pr:b=default -pr:h=windows --build=missing")
|
||||
}
|
||||
cmakeBuild buildDir: 'build', cmakeArgs: '-DGNU_HOST=x86_64-w64-mingw32 -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw_cross_toolchain.cmake', installation: 'latest', steps: [[args: 'all']]
|
||||
cmakeBuild buildDir: 'build', cmakeArgs: '-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Release', installation: 'latest', steps: [[args: 'all']]
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -12,7 +12,7 @@ include(CheckCSourceCompiles)
|
||||
|
||||
if(BUILD_TOOLS)
|
||||
# Import needed packages and references their include path
|
||||
find_package(PNG 1.6.37 REQUIRED)
|
||||
find_package(PNG 1.6.40 REQUIRED)
|
||||
include_directories(${PNG_INCLUDE_DIR})
|
||||
|
||||
|
||||
@ -40,9 +40,11 @@ if(BUILD_TOOLS)
|
||||
endif()
|
||||
|
||||
# Link externals libraries to the linker
|
||||
if (TARGET PNG::PNG)
|
||||
if(RSPTEXTURE_SHARED)
|
||||
target_link_libraries(rse-texture PRIVATE rsp-texture-lib ${PNG_LIBRARIES})
|
||||
target_link_libraries(rse-texture PRIVATE rsp-texture-lib PNG::PNG)
|
||||
elseif(RSPTEXTURE_STATIC)
|
||||
target_link_libraries(rse-texture PRIVATE rsp-texture-libstatic ${PNG_LIBRARIES})
|
||||
target_link_libraries(rse-texture PRIVATE rsp-texture-libstatic PNG::PNG)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -1,8 +0,0 @@
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
IF("${GNU_HOST}" STREQUAL "")
|
||||
SET(GNU_HOST i586-mingw32msvc)
|
||||
ENDIF()
|
||||
# Prefix detection only works with compiler id "GNU"
|
||||
SET(CMAKE_C_COMPILER ${GNU_HOST}-gcc)
|
||||
# CMake doesn't automatically look for prefixed 'windres', do it manually:
|
||||
SET(CMAKE_RC_COMPILER ${GNU_HOST}-windres)
|
@ -1,13 +1,13 @@
|
||||
[requires]
|
||||
zlib/1.2.12
|
||||
libpng/1.6.37
|
||||
zlib/1.2.13
|
||||
libpng/1.6.40
|
||||
|
||||
[generators]
|
||||
cmake
|
||||
cmake_find_package
|
||||
CMakeDeps
|
||||
CMakeToolchain
|
||||
|
||||
[options]
|
||||
libpng:shared=True
|
||||
libpng/*:shared=True
|
||||
|
||||
[imports]
|
||||
bin, *.dll -> ./bin
|
Loading…
x
Reference in New Issue
Block a user