From 122de7a7d7112f327aafe682bb967d0fa229d691 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Mon, 2 Aug 2021 01:37:20 -0500 Subject: [PATCH] cmake: Remove old add_pcsx2_* macros No longer used --- cmake/Pcsx2Utils.cmake | 67 ------------------------------------------ 1 file changed, 67 deletions(-) diff --git a/cmake/Pcsx2Utils.cmake b/cmake/Pcsx2Utils.cmake index f1fada8efc..646712634b 100644 --- a/cmake/Pcsx2Utils.cmake +++ b/cmake/Pcsx2Utils.cmake @@ -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 "$/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")