mirror of
https://github.com/libretro/Mu.git
synced 2026-02-04 05:35:13 +00:00
Various build fixes.
This commit is contained in:
@@ -299,8 +299,8 @@ libretro-build-rs90-odbeta-mips32:
|
||||
- .libretro-rs90-odbeta-cmake-mips32
|
||||
- .core-defs
|
||||
|
||||
# djgpp-static-cmake.yml
|
||||
libretro-build-djgpp: # TODO: What should this be called?
|
||||
extends:
|
||||
- .libretro-djgpp-static-cmake-retroarch-master
|
||||
- .core-defs
|
||||
## djgpp-static-cmake.yml
|
||||
#libretro-build-djgpp: # TODO: What should this be called?
|
||||
# extends:
|
||||
# - .libretro-djgpp-static-cmake-retroarch-master
|
||||
# - .core-defs
|
||||
|
||||
@@ -17,6 +17,39 @@ message("that you are resting well.")
|
||||
message(" -- Your friend, Stephanie")
|
||||
message("******************************")
|
||||
|
||||
# Some platforms cannot use FPIC code
|
||||
if(PLATFORM_PSP OR PSP)
|
||||
set(MU_FPIC OFF)
|
||||
else()
|
||||
set(MU_FPIC ON)
|
||||
endif()
|
||||
|
||||
# Where should dynamic libraries go when output?
|
||||
if(NOT DEFINED MU_DYLIB_OUTPUT_DIR)
|
||||
set(MU_DYLIB_OUTPUT_DIR
|
||||
"${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
# Need to set specific locations for output libraries?
|
||||
# Note that RUNTIME_OUTPUT_DIRECTORY is needed for the Windows build to output
|
||||
# directories since .DLL files are output there and not where shared libraries
|
||||
# go??? No idea really.
|
||||
macro(mu_target_binary_output target where)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${where}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${where}"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${where}")
|
||||
|
||||
foreach(outputConfig ${CMAKE_CONFIGURATION_TYPES})
|
||||
string(TOUPPER "${outputConfig}" outputConfig)
|
||||
|
||||
set_target_properties(${target} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY_${outputConfig} "${where}"
|
||||
LIBRARY_OUTPUT_DIRECTORY_${outputConfig} "${where}"
|
||||
ARCHIVE_OUTPUT_DIRECTORY_${outputConfig} "${where}")
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
# Main project sources
|
||||
add_subdirectory(src)
|
||||
|
||||
|
||||
@@ -23,6 +23,14 @@ target_include_directories(mu_libretro PUBLIC
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"libretro-common/include")
|
||||
|
||||
# Library location must be placed in the build output for the RetroArch
|
||||
# build system to pick up the library
|
||||
# Note that RUNTIME_OUTPUT_DIRECTORY is needed for the Windows build to output
|
||||
# directories since .DLL files are output there and not where shared libraries
|
||||
# go??? No idea really.
|
||||
mu_target_binary_output(mu_libretro
|
||||
"${MU_DYLIB_OUTPUT_DIR}")
|
||||
|
||||
# Custom launching the core, tries to find RetroArch on the system
|
||||
## Determine RetroArch directory
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
|
||||
@@ -47,4 +55,9 @@ if(DEFINED MU_LIBRETRO_DIR)
|
||||
COMMAND "${MU_LIBRETRO_DIR}/retroarch${MU_LIBRETRO_EXTENSION}" "-v" "-L" "$<TARGET_FILE:mu_libretro>"
|
||||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
|
||||
COMMENT "Starting RetroArch with Mu")
|
||||
|
||||
# Do not try running this by default
|
||||
set_target_properties(RetroArch PROPERTIES
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
EXCLUDE_FROM_DEFAULT_BUILD TRUE)
|
||||
endif()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Only include the sub-project if Qt was actually found
|
||||
find_package(Qt5 OPTIONAL_COMPONENTS Core Widgets)
|
||||
find_package(Qt5 OPTIONAL_COMPONENTS Core Gui Widgets Multimedia Svg)
|
||||
if(Qt5_FOUND EQUAL 0)
|
||||
message("Qt5 was not found by CMake, check readme.md!")
|
||||
message("Qt5 or one of their components were not found, check readme.md!")
|
||||
endif()
|
||||
|
||||
# Was this actually found now?
|
||||
|
||||
@@ -85,6 +85,14 @@ First install _Qt 5.14.2_, you may optionally install as well _Qt Creator_.
|
||||
* Mac: <https://download.qt.io/archive/qt/5.14/5.14.2/qt-opensource-mac-x64-5.14.2.dmg>
|
||||
* Linux: <https://download.qt.io/archive/qt/5.14/5.14.2/qt-opensource-linux-x64-5.14.2.run>
|
||||
|
||||
You need the following components of Qt5:
|
||||
|
||||
* Core
|
||||
* Gui
|
||||
* Widgets
|
||||
* Multimedia
|
||||
* Svg
|
||||
|
||||
When running _CMake_ you will need to pass `-DCMAKE_PREFIX_PATH` to the
|
||||
location of `Qt5Config.cmake`.
|
||||
|
||||
|
||||
@@ -14,8 +14,10 @@ add_library(MuCore STATIC
|
||||
w86l488.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCore
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCore
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Bring all the sub-modules as needed
|
||||
target_link_libraries(MuCore
|
||||
|
||||
@@ -14,8 +14,10 @@ add_library(MuCoreArmV5TEExperimental STATIC
|
||||
thumb_interpreter.cpp)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCoreArmV5TEExperimental
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCoreArmV5TEExperimental
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Currently do not enable the dynamic recompiler
|
||||
set(NO_TRANSLATION)
|
||||
|
||||
@@ -3,8 +3,10 @@ add_library(MuCoreAudio STATIC
|
||||
blip_buf.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCoreAudio
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCoreAudio
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Includes for the project
|
||||
target_include_directories(MuCoreAudio PUBLIC
|
||||
|
||||
@@ -3,8 +3,10 @@ add_library(MuCoreFileLauncher STATIC
|
||||
launcher.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCoreFileLauncher
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCoreFileLauncher
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Includes for the project
|
||||
target_include_directories(MuCoreFileLauncher PUBLIC
|
||||
|
||||
@@ -8,8 +8,10 @@ add_library(MuCoreM68k STATIC
|
||||
m68kops.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCoreM68k
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCoreM68k
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Includes for the project
|
||||
target_include_directories(MuCoreM68k PUBLIC
|
||||
|
||||
@@ -17,8 +17,10 @@ add_library(MuCorePxa260Experimental STATIC
|
||||
pxa260Udc.c)
|
||||
|
||||
# Make this position independent so it can be linked into shared libraries
|
||||
set_property(TARGET MuCorePxa260Experimental
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MU_FPIC)
|
||||
set_property(TARGET MuCorePxa260Experimental
|
||||
PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
# Bring all the sub-modules as needed
|
||||
target_link_libraries(MuCorePxa260Experimental
|
||||
|
||||
Reference in New Issue
Block a user