Add standalone glod support.

Techwolf Lupindo 2011-11-06 21:07:54 -05:00
parent 03bd80d8ae
commit d113e5fea8
2 changed files with 44 additions and 6 deletions

View File

@ -0,0 +1,36 @@
# -*- cmake -*-
# - Find GLOD
# This module defines
# GLOD_INCLUDE_DIR, where to find glod.h, etc.
# GLOD_LIBRARIES, the library needed to use GLOD.
# GLOD_FOUND, If false, do not try to use GLOD.
# LL coded the #include with a glod path in llfloatermodelpreview.cpp
find_path(GLOD_INCLUDE_DIR glod/glod.h)
set(GLOD_NAMES ${GLOD_NAMES} glod)
find_library(GLOD_LIBRARIES
NAMES ${GLOD_NAMES}
)
if (GLOD_LIBRARIES AND GLOD_INCLUDE_DIR)
set(GLOD_FOUND "YES")
else (GLOD_LIBRARIES AND GLOD_INCLUDE_DIR)
set(GLOD_FOUND "NO")
endif (GLOD_LIBRARIES AND GLOD_INCLUDE_DIR)
if (GLOD_FOUND)
if (NOT GLOD_FIND_QUIETLY)
message(STATUS "Found GLOD: Library in '${GLOD_LIBRARY}' and header in '${GLOD_INCLUDE_DIR}' ")
endif (NOT GLOD_FIND_QUIETLY)
else (GLOD_FOUND)
if (GLOD_FIND_REQUIRED)
message(FATAL_ERROR " * * * * *\nCould not find GLOD library!\n* * * * *")
endif (GLOD_FIND_REQUIRED)
endif (GLOD_FOUND)
mark_as_advanced(
GLOD_LIBRARIES
GLOD_INCLUDE_DIR
)

View File

@ -1,9 +1,11 @@
# -*- cmake -*-
include(Prebuilt)
if (NOT STANDALONE)
if (STANDALONE)
set(GLOD_FIND_REQUIRED true)
include(FindGLOD)
else (STANDALONE)
include(Prebuilt)
use_prebuilt_binary(GLOD)
endif (NOT STANDALONE)
set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
set(GLOD_LIBRARIES glod)
set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
set(GLOD_LIBRARIES glod)
endif (STANDALONE)