mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 12:00:17 +02:00
I may have gotten carried away. - I missed some stuff for end parenthesis because I accidentally searched within project files instead of the entire directory (so some thunk/test/windows stuff was missed), cleaned those up. - `INTERFACE`, `PUBLIC`, `PRIVATE`, `RUNTIME`, `LIBRARY` should be on the same line as the target name. (I should really invest in making a style guide...) - Some short statements were unnecessarily split across multiple lines--cleaned those up - Made a common `LinkerGC` module that applies gc-sections etc. to a target in Release mode - Usually for functions you want to have something on the first line, e.g. `FILES`/`DIRECTORY` for install, or the target/a positional argument, etc etc. Not always though, notably for some custom_command calls TODO: - What's with the `list(APPEND LIBS...)` stuff? It's used really inconsistently, sometimes not at all, sometimes it looks like there're duplicates? A more thorough cleanup is in order there. Signed-off-by: crueter <crueter@eden-emu.dev>
25 lines
847 B
CMake
25 lines
847 B
CMake
function(GenBinFmt Name)
|
|
# Get the filename only component
|
|
get_filename_component(FMT_NAME ${Name} NAME_WE)
|
|
|
|
# Configure it
|
|
configure_file(${Name} ${CMAKE_BINARY_DIR}/Data/binfmts/${FMT_NAME})
|
|
|
|
# Then install the configured binfmt
|
|
install(FILES ${CMAKE_BINARY_DIR}/Data/binfmts/${FMT_NAME}
|
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/binfmts/
|
|
COMPONENT Runtime)
|
|
endfunction()
|
|
|
|
if (NOT USE_LEGACY_BINFMTMISC)
|
|
configure_file(FEX-x86.conf.in ${CMAKE_BINARY_DIR}/Data/binfmts/FEX-x86.conf)
|
|
configure_file(FEX-x86_64.conf.in ${CMAKE_BINARY_DIR}/Data/binfmts/FEX-x86_64.conf)
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/Data/binfmts/FEX-x86.conf ${CMAKE_BINARY_DIR}/Data/binfmts/FEX-x86_64.conf
|
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/binfmt.d/
|
|
COMPONENT Runtime)
|
|
else()
|
|
GenBinFmt(FEX-x86.in)
|
|
GenBinFmt(FEX-x86_64.in)
|
|
endif()
|