mirror of https://github.com/axmolengine/axmol.git
Use COCOS_EXTERNAL_DIR in Find*.cmake modules
This commit is contained in:
parent
673fdc461d
commit
a3b414f0d5
|
@ -84,6 +84,8 @@ else()
|
|||
set (BUILD_TYPE SHARED)
|
||||
endif()
|
||||
|
||||
set(COCOS_EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
|
||||
|
||||
# Some macro definitions
|
||||
if(WINDOWS)
|
||||
|
||||
|
|
|
@ -32,15 +32,14 @@ if(USE_PREBUILT_LIBS)
|
|||
PATH_SUFFIXES
|
||||
include/chipmunk
|
||||
include
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/chipmunk
|
||||
PATHS ${COCOS_EXTERNAL_DIR}/chipmunk
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(CHIPMUNK_LIBRARY
|
||||
NAMES chipmunk libchipmunk
|
||||
find_library(CHIPMUNK_LIBRARY NAMES chipmunk libchipmunk
|
||||
PATH_SUFFIXES
|
||||
prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
prebuilt/${PLATFORM_FOLDER}
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/chipmunk
|
||||
PATHS ${COCOS_EXTERNAL_DIR}/chipmunk
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
|
||||
|
|
|
@ -45,20 +45,19 @@
|
|||
|
||||
if(USE_PREBUILT_LIBS)
|
||||
find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/include/${PLATFORM_FOLDER}
|
||||
PATHS ${COCOS_EXTERNAL_DIR}/freetype2/include/${PLATFORM_FOLDER}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
||||
PATHS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/include/${PLATFORM_FOLDER}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/include/${PLATFORM_FOLDER}/freetype2
|
||||
${COCOS_EXTERNAL_DIR}/freetype2/include/${PLATFORM_FOLDER}
|
||||
${COCOS_EXTERNAL_DIR}/freetype2/include/${PLATFORM_FOLDER}/freetype2
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(FREETYPE_LIBRARY
|
||||
NAMES freetype libfreetype freetype219 freetype250
|
||||
find_library(FREETYPE_LIBRARY NAMES freetype libfreetype freetype219 freetype250
|
||||
PATHS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype2/prebuilt/${PLATFORM_FOLDER}
|
||||
${COCOS_EXTERNAL_DIR}/freetype2/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${COCOS_EXTERNAL_DIR}/freetype2/prebuilt/${PLATFORM_FOLDER}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
|
||||
|
|
|
@ -30,14 +30,13 @@
|
|||
# Try find glfw for our arch in external folder
|
||||
if(USE_PREBUILT_LIBS)
|
||||
find_path(GLFW3_INCLUDE_DIR glfw3.h
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/include/${PLATFORM_FOLDER}
|
||||
PATHS ${COCOS_EXTERNAL_DIR}/glfw3/include/${PLATFORM_FOLDER}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(GLFW3_LIBRARY
|
||||
NAMES glfw3 libglfw3 lgfw
|
||||
find_library(GLFW3_LIBRARY NAMES glfw3 libglfw3 lgfw
|
||||
PATHS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/glfw3/prebuilt/${PLATFORM_FOLDER}
|
||||
${COCOS_EXTERNAL_DIR}/glfw3/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${COCOS_EXTERNAL_DIR}/glfw3/prebuilt/${PLATFORM_FOLDER}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
|
||||
|
|
|
@ -19,15 +19,14 @@ if(USE_PREBUILT_LIBS)
|
|||
PATH_SUFFIXES
|
||||
include/tinyxml2
|
||||
include
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinyxml2
|
||||
PATHS ${COCOS_EXTERNAL_DIR}/tinyxml2
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(TinyXML2_LIBRARY
|
||||
NAMES tinyxml2 libtinyxml2
|
||||
find_library(TinyXML2_LIBRARY NAMES tinyxml2 libtinyxml2
|
||||
PATH_SUFFIXES
|
||||
prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
prebuilt/${PLATFORM_FOLDER}
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinyxml2
|
||||
PATHS ${COCOS_EXTERNAL_DIR}/tinyxml2
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
|
||||
|
|
|
@ -30,14 +30,15 @@
|
|||
# Try find WebP for our arch in external folder
|
||||
if(USE_PREBUILT_LIBS)
|
||||
find_path(WEBP_INCLUDE_DIR decode.h
|
||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/webp/include/${PLATFORM_FOLDER}
|
||||
PATH_SUFFIXES include/${PLATFORM_FOLDER} include
|
||||
PATHS ${COCOS_EXTERNAL_DIR}/webp
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(WEBP_LIBRARY
|
||||
NAMES webp libwebp
|
||||
PATHS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/webp/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/webp/prebuilt/${PLATFORM_FOLDER}
|
||||
find_library(WEBP_LIBRARY NAMES webp libwebp
|
||||
PATH_SUFFIXES
|
||||
prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
|
||||
prebuilt/${PLATFORM_FOLDER}
|
||||
PATHS ${COCOS_EXTERNAL_DIR}/webp
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
# cleanup if not found (prevent from mix prebuilt include paths and system installed libraries)
|
||||
|
|
Loading…
Reference in New Issue