cmake: Remove old add_pcsx2_* macros

No longer used
This commit is contained in:
TellowKrinkle 2021-08-02 01:37:20 -05:00 committed by Kojin
parent e17f83c2cf
commit 122de7a7d7
1 changed files with 0 additions and 67 deletions

View File

@ -113,73 +113,6 @@ function(alias_library new old)
add_library(${new} ALIAS _alias_${library_no_namespace})
endfunction()
#NOTE: this macro is used to get rid of whitespace and newlines.
macro(append_flags target flags)
if(flags STREQUAL "")
set(flags " ") # set to space to avoid error
endif()
get_target_property(TEMP ${target} COMPILE_FLAGS)
if(TEMP STREQUAL "TEMP-NOTFOUND")
set(TEMP "") # set to empty string
else()
set(TEMP "${TEMP} ") # a space to cleanly separate from existing content
endif()
# append our values
set(TEMP "${TEMP}${flags}")
# fix arg list
set(TEMP2 "")
foreach(_arg ${TEMP})
set(TEMP2 "${TEMP2} ${_arg}")
endforeach()
set_target_properties(${target} PROPERTIES COMPILE_FLAGS "${TEMP2}")
endmacro(append_flags)
macro(add_pcsx2_plugin lib srcs libs flags)
include_directories(.)
add_library(${lib} MODULE ${srcs})
target_link_libraries(${lib} ${libs})
append_flags(${lib} "${flags}")
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
target_link_libraries(${lib} "${USER_CMAKE_LD_FLAGS}")
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
if(PACKAGE_MODE)
install(TARGETS ${lib} DESTINATION ${CMAKE_INSTALL_LIBDIR}/PCSX2)
else(PACKAGE_MODE)
install(TARGETS ${lib} DESTINATION ${CMAKE_SOURCE_DIR}/bin/plugins)
endif(PACKAGE_MODE)
if (APPLE)
# Output to app bundle
set_target_properties(${lib} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "$<TARGET_FILE_DIR:PCSX2>/plugins")
add_dependencies(pcsx2-postprocess-bundle ${lib})
endif()
endmacro(add_pcsx2_plugin)
macro(add_pcsx2_lib lib srcs libs flags)
include_directories(.)
add_library(${lib} STATIC ${srcs})
target_link_libraries(${lib} ${libs})
append_flags(${lib} "${flags}")
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
target_link_libraries(${lib} "${USER_CMAKE_LD_FLAGS}")
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
endmacro(add_pcsx2_lib)
macro(add_pcsx2_executable exe srcs libs flags)
add_definitions(${flags})
include_directories(.)
add_executable(${exe} ${srcs})
target_link_libraries(${exe} ${libs})
append_flags(${exe} "${flags}")
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
target_link_libraries(${exe} "${USER_CMAKE_LD_FLAGS}")
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
if(PACKAGE_MODE)
install(TARGETS ${exe} DESTINATION ${CMAKE_INSTALL_BINDIR})
else(PACKAGE_MODE)
install(TARGETS ${exe} DESTINATION ${CMAKE_SOURCE_DIR}/bin)
endif(PACKAGE_MODE)
endmacro(add_pcsx2_executable)
# Helper macro to generate resources on linux (based on glib)
macro(add_custom_glib_res out xml prefix)
set(RESOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/res")