-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindSoftPixelEngine.cmake
61 lines (49 loc) · 1.29 KB
/
FindSoftPixelEngine.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Custom CMake module for finding "SoftPixel Engine SDK" files
# Written by Lukas Hermanns on 25/07/2012
set(SoftPixelEngine_ROOT_DIR ${PROJECT_SOURCE_DIR}/../SoftPixelEngine)
set(SoftPixelEngine_LIB_ROOT_DIR ${SoftPixelEngine_ROOT_DIR}/cmake/build)
# Macros
macro(_SOFTPIXELENGINE_APPEND_LIBRARIES _list _release)
set(_debug ${_release}_DEBUG)
if(${_debug})
set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}})
else()
set(${_list} ${${_list}} ${${_release}})
endif()
endmacro()
# Find library
find_path(
SoftPixelEngine_INCLUDE_DIR
NAMES
SoftPixelEngine.hpp
HINTS
${SoftPixelEngine_ROOT_DIR}/repository/sources
${SoftPixelEngine_ROOT_DIR}/sources
)
find_library(
SoftPixelEngine_LIBRARY
NAMES
SoftPixelEngine
HINTS
${SoftPixelEngine_LIB_ROOT_DIR}/lib/Release
)
find_library(
SoftPixelEngine_LIBRARY_DEBUG
NAMES
SoftPixelEngine
HINTS
${SoftPixelEngine_LIB_ROOT_DIR}/lib/Debug
)
# Setup package handle
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
SoftPixelEngine
DEFAULT_MSG
SoftPixelEngine_LIBRARY
SoftPixelEngine_LIBRARY_DEBUG
SoftPixelEngine_INCLUDE_DIR
)
if(SOFTPIXELENGINE_FOUND)
set(SoftPixelEngine_FOUND TRUE)
_SOFTPIXELENGINE_APPEND_LIBRARIES(SoftPixelEngine_LIBRARIES SoftPixelEngine_LIBRARY)
endif(SOFTPIXELENGINE_FOUND)