mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 02:29:59 -06:00
Fix for issue 3507. Compile with old GLEW versions, support user-specified CFLAGS and link plugins to all the used libs.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6441 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -49,7 +49,7 @@ endif(NO_UNUSED_RESULT)
|
||||
|
||||
CHECK_CXX_COMPILER_FLAG(-fvisibility-inlines-hidden VISIBILITY_INLINES_HIDDEN)
|
||||
if(VISIBILITY_INLINES_HIDDEN)
|
||||
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
|
||||
endif(VISIBILITY_INLINES_HIDDEN)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
@ -242,16 +242,17 @@ include_directories(Externals/Bochs_disasm)
|
||||
add_subdirectory(Externals/Lua)
|
||||
include_directories(Externals/Lua)
|
||||
|
||||
find_library(LZO lzo2)
|
||||
find_path(LZO_INCLUDE lzo/lzo1x.h)
|
||||
if(LZO AND LZO_INCLUDE)
|
||||
include(CheckLib)
|
||||
|
||||
check_lib_and_header(LZO lzo2 lzo/lzo1x.h OPTIONAL)
|
||||
if(LZO_FOUND)
|
||||
message("Using shared lzo")
|
||||
include_directories(${LZO_INCLUDE})
|
||||
else()
|
||||
message("Shared lzo not found, falling back to the static library")
|
||||
add_subdirectory(Externals/LZO)
|
||||
include_directories(Externals/LZO)
|
||||
endif(LZO AND LZO_INCLUDE)
|
||||
endif()
|
||||
|
||||
include(FindSDL OPTIONAL)
|
||||
if(SDL_FOUND)
|
||||
@ -264,27 +265,25 @@ else(SDL_FOUND)
|
||||
add_subdirectory(Externals/SDL)
|
||||
endif(SDL_FOUND)
|
||||
|
||||
find_library(SFML_NETWORK sfml-network)
|
||||
find_path(SFML_INCLUDE SFML/Network/Ftp.hpp)
|
||||
if(SFML_NETWORK AND SFML_INCLUDE)
|
||||
check_lib_and_header(SFML sfml-network SFML/Network/Ftp.hpp OPTIONAL)
|
||||
if(SFML_FOUND)
|
||||
message("Using shared sfml-network")
|
||||
include_directories(${SFML_INCLUDE})
|
||||
else()
|
||||
message("Shared sfml-network not found, falling back to the static library")
|
||||
add_subdirectory(Externals/SFML)
|
||||
include_directories(Externals/SFML/include)
|
||||
endif(SFML_NETWORK AND SFML_INCLUDE)
|
||||
endif()
|
||||
|
||||
find_library(SOIL SOIL)
|
||||
find_path(SOIL_INCLUDE SOIL/SOIL.h)
|
||||
if(SOIL AND SOIL_INCLUDE)
|
||||
check_lib_and_header(SOIL SOIL SOIL/SOIL.h OPTIONAL)
|
||||
if(SOIL_FOUND)
|
||||
message("Using shared SOIL")
|
||||
include_directories(${SOIL_INCLUDE})
|
||||
else()
|
||||
message("Shared SOIL not found, falling back to the static library")
|
||||
add_subdirectory(Externals/SOIL)
|
||||
include_directories(Externals/SOIL)
|
||||
endif(SOIL AND SOIL_INCLUDE)
|
||||
endif()
|
||||
|
||||
include(FindZLIB OPTIONAL)
|
||||
if(ZLIB_FOUND)
|
||||
@ -300,11 +299,10 @@ if(WIN32)
|
||||
find_library(GLEW glew32s PATHS Externals/GLew)
|
||||
include_directories(Externals/GLew/include)
|
||||
else()
|
||||
include(CheckLib)
|
||||
check_lib(GLEW glew REQUIRED)
|
||||
check_lib(GLU glu REQUIRED)
|
||||
check_lib(CG Cg REQUIRED)
|
||||
check_lib(CGGL CgGL REQUIRED)
|
||||
check_lib_and_header(GLEW GLEW GL/glew.h REQUIRED)
|
||||
check_lib_and_header(CG Cg Cg/cg.h REQUIRED)
|
||||
check_lib_and_header(CGGL CgGL Cg/cgGL.h REQUIRED)
|
||||
endif()
|
||||
|
||||
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
|
||||
|
Reference in New Issue
Block a user