mirror of https://github.com/PCSX2/pcsx2.git
cmake: sparsehash moves header file in newer version! Detect the 2 include pathes and add a define. Fix issue 1222
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5117 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
30e538a3c6
commit
6a0953ab94
|
@ -0,0 +1,18 @@
|
||||||
|
# Try to find SparseHash
|
||||||
|
# Once done, this will define
|
||||||
|
#
|
||||||
|
# SPARSEHASE_NEW_FOUND - system has SparseHash
|
||||||
|
# SPARSEHASE_NEW_INCLUDE_DIR - the SparseHash include directories
|
||||||
|
|
||||||
|
if(SPARSEHASE_NEW_INCLUDE_DIR)
|
||||||
|
set(SPARSEHASE_NEW_FIND_QUIETLY TRUE)
|
||||||
|
endif(SPARSEHASE_NEW_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_path(SPARSEHASE_NEW_INCLUDE_DIR sparsehash/internal/densehashtable.h)
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set SPARSEHASE_NEW_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(SparseHash_new DEFAULT_MSG SPARSEHASE_NEW_INCLUDE_DIR)
|
||||||
|
|
||||||
|
mark_as_advanced(SPARSEHASE_NEW_INCLUDE_DIR)
|
|
@ -61,6 +61,7 @@ if(NOT FORCE_INTERNAL_SOUNDTOUCH)
|
||||||
include(FindSoundTouch)
|
include(FindSoundTouch)
|
||||||
endif(NOT FORCE_INTERNAL_SOUNDTOUCH)
|
endif(NOT FORCE_INTERNAL_SOUNDTOUCH)
|
||||||
include(FindSparseHash)
|
include(FindSparseHash)
|
||||||
|
include(FindSparseHash_NEW)
|
||||||
|
|
||||||
# Note for include_directory: The order is important to avoid a mess between include file from your system and the one of pcsx2
|
# Note for include_directory: The order is important to avoid a mess between include file from your system and the one of pcsx2
|
||||||
# If you include first 3rdparty, all 3rdpary include will have a higer priority...
|
# If you include first 3rdparty, all 3rdpary include will have a higer priority...
|
||||||
|
@ -166,6 +167,11 @@ endif(SOUNDTOUCH_FOUND AND NOT projectSoundTouch)
|
||||||
if(SPARSEHASH_FOUND)
|
if(SPARSEHASH_FOUND)
|
||||||
include_directories(${SPARSEHASH_INCLUDE_DIR})
|
include_directories(${SPARSEHASH_INCLUDE_DIR})
|
||||||
endif(SPARSEHASH_FOUND)
|
endif(SPARSEHASH_FOUND)
|
||||||
|
if(SPARSEHASH_NEW_FOUND)
|
||||||
|
include_directories(${SPARSEHASH_NEW_INCLUDE_DIR})
|
||||||
|
# allow to build parts that depend on sparsehash
|
||||||
|
set(SPARSEHASH_FOUND TRUE)
|
||||||
|
endif(SPARSEHASH_NEW_FOUND)
|
||||||
|
|
||||||
# Wx
|
# Wx
|
||||||
if(wxWidgets_FOUND)
|
if(wxWidgets_FOUND)
|
||||||
|
|
|
@ -15,10 +15,18 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// They move include file in version 2.0.2 of google sparsehash...
|
||||||
|
#ifdef SPARSEHASH_NEW_INCLUDE_DIR
|
||||||
|
#include <sparsehash/type_traits.h>
|
||||||
|
#include <sparsehash/dense_hash_set>
|
||||||
|
#include <sparsehash/dense_hash_map>
|
||||||
|
#include <sparsehash/internal/densehashtable.h>
|
||||||
|
#else
|
||||||
#include <google/type_traits.h>
|
#include <google/type_traits.h>
|
||||||
#include <google/dense_hash_set>
|
#include <google/dense_hash_set>
|
||||||
#include <google/dense_hash_map>
|
#include <google/dense_hash_map>
|
||||||
#include <google/sparsehash/densehashtable.h>
|
#include <google/sparsehash/densehashtable.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,10 @@ set(CommonFlags
|
||||||
-pipe
|
-pipe
|
||||||
-Wunused-variable)
|
-Wunused-variable)
|
||||||
|
|
||||||
|
if (SPARSEHASH_NEW_FOUND)
|
||||||
|
set(CommonFlags "${CommonFlags} -DSPARSEHASH_NEW_INCLUDE_DIR ")
|
||||||
|
endif (SPARSEHASH_NEW_FOUND)
|
||||||
|
|
||||||
# set warning flags
|
# set warning flags
|
||||||
set(DebugFlags
|
set(DebugFlags
|
||||||
-g
|
-g
|
||||||
|
|
|
@ -22,6 +22,10 @@ set(CommonFlags
|
||||||
-Wstrict-aliasing # Allow to track strict aliasing issue.
|
-Wstrict-aliasing # Allow to track strict aliasing issue.
|
||||||
-pipe)
|
-pipe)
|
||||||
|
|
||||||
|
if (SPARSEHASH_NEW_FOUND)
|
||||||
|
set(CommonFlags "${CommonFlags} -DSPARSEHASH_NEW_INCLUDE_DIR ")
|
||||||
|
endif (SPARSEHASH_NEW_FOUND)
|
||||||
|
|
||||||
# set warning flags
|
# set warning flags
|
||||||
set(DebugFlags
|
set(DebugFlags
|
||||||
-W
|
-W
|
||||||
|
|
Loading…
Reference in New Issue