Add support for building with a different Qt
This commit is contained in:
parent
e7a396655c
commit
2141b12b29
@ -4,6 +4,9 @@ project(nostalgia)
|
|||||||
|
|
||||||
set(NOSTALGIA_BUILD_TYPE "Native" CACHE STRING "The type of build to produce(Native/GBA)")
|
set(NOSTALGIA_BUILD_TYPE "Native" CACHE STRING "The type of build to produce(Native/GBA)")
|
||||||
set(NOSTALGIA_IDE_BUILD "ON" CACHE STRING "Build for IDE's to run")
|
set(NOSTALGIA_IDE_BUILD "ON" CACHE STRING "Build for IDE's to run")
|
||||||
|
set(NOSTALGIA_QT_PATH "" CACHE STRING "Path to Qt Libraries")
|
||||||
|
|
||||||
|
set(CMAKE_PREFIX_PATH ${NOSTALGIA_QT_PATH})
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||||
include(address_sanitizer)
|
include(address_sanitizer)
|
||||||
@ -22,7 +25,7 @@ endif()
|
|||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-std=c++14
|
-std=c++14
|
||||||
#-fdiagnostics-color
|
#-fdiagnostics-color # forces colored output when using ninja
|
||||||
-Wall
|
-Wall
|
||||||
-Wsign-compare
|
-Wsign-compare
|
||||||
)
|
)
|
||||||
@ -42,6 +45,9 @@ if(APPLE)
|
|||||||
set(NOSTALGIA_DIST_MAC_APP_CONTENTS Nostalgia.app/Contents)
|
set(NOSTALGIA_DIST_MAC_APP_CONTENTS Nostalgia.app/Contents)
|
||||||
else()
|
else()
|
||||||
set(CMAKE_INSTALL_RPATH "$ORIGIN" "$ORIGIN/../lib/nostalgia")
|
set(CMAKE_INSTALL_RPATH "$ORIGIN" "$ORIGIN/../lib/nostalgia")
|
||||||
|
if(NOT ${NOSTALGIA_QT_PATH} STREQUAL "")
|
||||||
|
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH} "${NOSTALGIA_QT_PATH}/lib")
|
||||||
|
endif()
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||||
set(NOSTALGIA_DIST_BIN bin)
|
set(NOSTALGIA_DIST_BIN bin)
|
||||||
set(NOSTALGIA_DIST_LIB lib)
|
set(NOSTALGIA_DIST_LIB lib)
|
||||||
|
@ -21,6 +21,10 @@ if (${buildType} -eq "asan") {
|
|||||||
$buildTypeArgs="-DCMAKE_BUILD_TYPE=Release"
|
$buildTypeArgs="-DCMAKE_BUILD_TYPE=Release"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (${env:NOSTALGIA_QT_PATH} -ne "") {
|
||||||
|
$qtPath="-DNOSTALGIA_QT_PATH=${env:NOSTALGIA_QT_PATH}"
|
||||||
|
}
|
||||||
|
|
||||||
$buildDir="${project}/build/${target}-${buildType}"
|
$buildDir="${project}/build/${target}-${buildType}"
|
||||||
$distDir="${project}/dist/${target}-${buildType}"
|
$distDir="${project}/dist/${target}-${buildType}"
|
||||||
|
|
||||||
@ -32,6 +36,7 @@ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
|
|||||||
-DNOSTALGIA_IDE_BUILD=OFF `
|
-DNOSTALGIA_IDE_BUILD=OFF `
|
||||||
$buildTool `
|
$buildTool `
|
||||||
$buildTypeArgs `
|
$buildTypeArgs `
|
||||||
|
$qtPath `
|
||||||
$toolchain `
|
$toolchain `
|
||||||
$project
|
$project
|
||||||
Pop-Location
|
Pop-Location
|
||||||
|
Loading…
Reference in New Issue
Block a user