cmake: fix commit f3a50a01a7

* link common with c lib (required for gold linker)
* fix the macro to properly set the library variable
  => use the variable instead to hardcoded value
This commit is contained in:
Gregory Hainaut 2014-09-24 09:00:35 +02:00
parent cee80eb5f4
commit 5b3f031654
4 changed files with 10 additions and 13 deletions

View File

@ -17,20 +17,20 @@ macro(check_lib var lib)
# Make sure include directories for headers found using find_path below # Make sure include directories for headers found using find_path below
# are re-added when reconfiguring # are re-added when reconfiguring
include_directories(${${var}_INCLUDE}) include_directories(${${var}_INCLUDE})
_internal_message("${lib} found") _internal_message("-- ${lib} found")
else() else()
find_library(${var} ${lib}) find_library(${var}_LIBRARIES ${lib})
if(_arg_list) if(_arg_list)
find_path(${var}_INCLUDE ${_arg_list}) find_path(${var}_INCLUDE ${_arg_list})
else() else()
set(${var}_INCLUDE FALSE) set(${var}_INCLUDE FALSE)
endif() endif()
if(${var} AND ${var}_INCLUDE) if(${var}_LIBRARIES AND ${var}_INCLUDE)
include_directories(${${var}_INCLUDE}) include_directories(${${var}_INCLUDE})
_internal_message("${lib} found") _internal_message("-- ${lib} found")
set(${var}_FOUND 1 CACHE INTERNAL "") set(${var}_FOUND 1 CACHE INTERNAL "")
else() else()
_internal_message("${lib} not found") _internal_message("-- ${lib} not found")
endif() endif()
endif() endif()
endmacro() endmacro()

View File

@ -172,6 +172,7 @@ set(UtilitiesFinalSources
) )
set(UtilitiesFinalLibs set(UtilitiesFinalLibs
${LIBC_LIBRARIES} # Gold (new linux linker) does not get automatically dependency of dependency
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
) )

View File

@ -692,7 +692,7 @@ set(pcsx2FinalLibs
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
${GTK2_LIBRARIES} ${GTK2_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
aio ${AIO_LIBRARIES}
) )
# additonal include directories # additonal include directories

View File

@ -147,7 +147,9 @@ set(spu2xFinalSources
set(spu2xFinalLibs set(spu2xFinalLibs
Utilities Utilities
${ALSA_LIBRARIES} ${ALSA_LIBRARIES}
portaudio ${PORTAUDIO_LIBRARIES}
${GTK2_LIBRARIES}
${SOUNDTOUCH_LIBRARIES}
) )
if (SDL2_API) if (SDL2_API)
@ -162,10 +164,4 @@ else()
) )
endif() endif()
set(spu2xFinalLibs
${spu2xFinalLibs}
SoundTouch
${GTK2_LIBRARIES}
)
add_pcsx2_plugin(${Output} "${spu2xFinalSources}" "${spu2xFinalLibs}" "${spu2xFinalFlags}") add_pcsx2_plugin(${Output} "${spu2xFinalSources}" "${spu2xFinalLibs}" "${spu2xFinalFlags}")