Added _LIBRARIES var to mix
This commit is contained in:
parent
853fad71ae
commit
5211c782d8
@ -9,19 +9,19 @@ MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBU
|
|||||||
|
|
||||||
SET(MY_PATH_INCLUDE )
|
SET(MY_PATH_INCLUDE )
|
||||||
SET(MY_PATH_LIB )
|
SET(MY_PATH_LIB )
|
||||||
|
|
||||||
FOREACH( MYPATH ${SEARCHPATHLIST} )
|
FOREACH( MYPATH ${SEARCHPATHLIST} )
|
||||||
SET(MY_PATH_INCLUDE ${MY_PATH_INCLUDE} ${MYPATH}/include)
|
SET(MY_PATH_INCLUDE ${MY_PATH_INCLUDE} ${MYPATH}/include)
|
||||||
SET(MY_PATH_LIB ${MY_PATH_LIB} ${MYPATH}/lib)
|
SET(MY_PATH_LIB ${MY_PATH_LIB} ${MYPATH}/lib)
|
||||||
ENDFOREACH( MYPATH ${SEARCHPATHLIST} )
|
ENDFOREACH( MYPATH ${SEARCHPATHLIST} )
|
||||||
|
|
||||||
FIND_PATH("${DEPNAME}_INCLUDE_DIR" ${INCLUDEFILE}
|
FIND_PATH("${DEPNAME}_INCLUDE_DIR" ${INCLUDEFILE}
|
||||||
${MY_PATH_INCLUDE}
|
${MY_PATH_INCLUDE}
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
)
|
)
|
||||||
MARK_AS_ADVANCED("${DEPNAME}_INCLUDE_DIR")
|
MARK_AS_ADVANCED("${DEPNAME}_INCLUDE_DIR")
|
||||||
#MESSAGE( " ${DEPNAME}_INCLUDE_DIR --> ${${DEPNAME}_INCLUDE_DIR}<--")
|
#MESSAGE( " ${DEPNAME}_INCLUDE_DIR --> ${${DEPNAME}_INCLUDE_DIR}<--")
|
||||||
|
|
||||||
SET(LIBRARY_NAMES "")
|
SET(LIBRARY_NAMES "")
|
||||||
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
|
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
|
||||||
LIST(APPEND LIBRARY_NAMES "${LIBNAME}${EXSUFFIX}")
|
LIST(APPEND LIBRARY_NAMES "${LIBNAME}${EXSUFFIX}")
|
||||||
@ -35,7 +35,7 @@ MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBU
|
|||||||
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
|
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
|
||||||
LIST(APPEND LIBRARY_NAMES_DEBUG "${LIBNAME}${DEBUGSUFFIX}${EXSUFFIX}")
|
LIST(APPEND LIBRARY_NAMES_DEBUG "${LIBNAME}${DEBUGSUFFIX}${EXSUFFIX}")
|
||||||
ENDFOREACH(LIBNAME)
|
ENDFOREACH(LIBNAME)
|
||||||
FIND_LIBRARY("${DEPNAME}_LIBRARY_DEBUG"
|
FIND_LIBRARY("${DEPNAME}_LIBRARY_DEBUG"
|
||||||
NAMES ${LIBRARY_NAMES_DEBUG}
|
NAMES ${LIBRARY_NAMES_DEBUG}
|
||||||
PATHS ${MY_PATH_LIB}
|
PATHS ${MY_PATH_LIB}
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
@ -49,7 +49,13 @@ MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBU
|
|||||||
MESSAGE("-- Warning Debug ${DEPNAME} not found, using: ${${DEPNAME}_LIBRARY}")
|
MESSAGE("-- Warning Debug ${DEPNAME} not found, using: ${${DEPNAME}_LIBRARY}")
|
||||||
SET(${DEPNAME}_LIBRARY_DEBUG "${${DEPNAME}_LIBRARY}")
|
SET(${DEPNAME}_LIBRARY_DEBUG "${${DEPNAME}_LIBRARY}")
|
||||||
ENDIF(NOT ${DEPNAME}_LIBRARY_DEBUG)
|
ENDIF(NOT ${DEPNAME}_LIBRARY_DEBUG)
|
||||||
|
|
||||||
|
SET(${DEPNAME}_LIBRARIES debug ${${DEPNAME}_LIBRARY_DEBUG} optimized ${${DEPNAME}_LIBRARY} )
|
||||||
|
|
||||||
ENDIF(${DEPNAME}_INCLUDE_DIR AND ${DEPNAME}_LIBRARY)
|
ENDIF(${DEPNAME}_INCLUDE_DIR AND ${DEPNAME}_LIBRARY)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ENDMACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX)
|
ENDMACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX)
|
||||||
|
|
||||||
|
|
||||||
@ -61,7 +67,7 @@ MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
|||||||
FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D" "_i")
|
FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D" "_i")
|
||||||
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype2311MT;freetype234;freetype234MT;freetype235;freetype237;freetype238;freetype244;freetype250;" ${OSG_3RDPARTY_BIN} "d" "")
|
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype2311MT;freetype234;freetype234MT;freetype235;freetype237;freetype238;freetype244;freetype250;" ${OSG_3RDPARTY_BIN} "d" "")
|
||||||
IF(FREETYPE_FOUND)
|
IF(FREETYPE_FOUND)
|
||||||
#forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
|
#forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
|
||||||
SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
||||||
SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
||||||
MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
|
MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
@ -72,7 +78,7 @@ MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
|||||||
FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal16" ${OSG_3RDPARTY_BIN} "d" "_i")
|
FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal16" ${OSG_3RDPARTY_BIN} "d" "_i")
|
||||||
FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D" "")
|
FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D" "")
|
||||||
IF(GLUT_FOUND)
|
IF(GLUT_FOUND)
|
||||||
#forcing subsequent FindGlut stuff to not search for other variables.... kind of a hack
|
#forcing subsequent FindGlut stuff to not search for other variables.... kind of a hack
|
||||||
SET(GLUT_glut_LIBRARY ${GLUT_LIBRARY} CACHE FILEPATH "")
|
SET(GLUT_glut_LIBRARY ${GLUT_LIBRARY} CACHE FILEPATH "")
|
||||||
MARK_AS_ADVANCED(GLUT_glut_LIBRARY)
|
MARK_AS_ADVANCED(GLUT_glut_LIBRARY)
|
||||||
ENDIF(GLUT_FOUND)
|
ENDIF(GLUT_FOUND)
|
||||||
@ -81,14 +87,14 @@ MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
|||||||
IF(ZLIB_FOUND)
|
IF(ZLIB_FOUND)
|
||||||
FIND_DEPENDENCY(PNG png.h "libpng;libpng13;libpng15;libpng16" ${OSG_3RDPARTY_BIN} "D" "")
|
FIND_DEPENDENCY(PNG png.h "libpng;libpng13;libpng15;libpng16" ${OSG_3RDPARTY_BIN} "D" "")
|
||||||
IF(PNG_FOUND)
|
IF(PNG_FOUND)
|
||||||
#forcing subsequent FindPNG stuff to not search for other variables.... kind of a hack
|
#forcing subsequent FindPNG stuff to not search for other variables.... kind of a hack
|
||||||
SET(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIR} CACHE FILEPATH "")
|
SET(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIR} CACHE FILEPATH "")
|
||||||
MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR)
|
MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR)
|
||||||
ENDIF(PNG_FOUND)
|
ENDIF(PNG_FOUND)
|
||||||
ENDIF(ZLIB_FOUND)
|
ENDIF(ZLIB_FOUND)
|
||||||
FIND_DEPENDENCY(LIBXML2 libxml2 "libxml2" ${OSG_3RDPARTY_BIN} "D" "")
|
FIND_DEPENDENCY(LIBXML2 libxml2 "libxml2" ${OSG_3RDPARTY_BIN} "D" "")
|
||||||
IF(LIBXML2_FOUND)
|
IF(LIBXML2_FOUND)
|
||||||
# The CMAKE find libxml module uses LIBXML2_LIBRARIES -> fill it.... kind of a hack
|
# The CMAKE find libxml module uses LIBXML2_LIBRARIES -> fill it.... kind of a hack
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} CACHE FILEPATH "" FORCE)
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} CACHE FILEPATH "" FORCE)
|
||||||
SET(LIBXML2_XMLLINT_EXECUTABLE ${OSG_3RDPARTY_BIN}/bin/xmllint.exe CACHE FILEPATH "Path to xmllint executable" FORCE)
|
SET(LIBXML2_XMLLINT_EXECUTABLE ${OSG_3RDPARTY_BIN}/bin/xmllint.exe CACHE FILEPATH "Path to xmllint executable" FORCE)
|
||||||
ENDIF(LIBXML2_FOUND)
|
ENDIF(LIBXML2_FOUND)
|
||||||
@ -132,7 +138,7 @@ IF(USE_3RDPARTY_BIN)
|
|||||||
SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdParty_win32binaries_vs90sp1")
|
SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdParty_win32binaries_vs90sp1")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(NOT EXISTS ${TEST_3RDPARTY_DIR})
|
ENDIF(NOT EXISTS ${TEST_3RDPARTY_DIR})
|
||||||
|
|
||||||
SET(ACTUAL_3RDPARTY_DIR "${TEST_3RDPARTY_DIR}" CACHE PATH "Location of 3rdparty dependencies")
|
SET(ACTUAL_3RDPARTY_DIR "${TEST_3RDPARTY_DIR}" CACHE PATH "Location of 3rdparty dependencies")
|
||||||
SET(ACTUAL_3DPARTY_DIR "${ACTUAL_3RDPARTY_DIR}") # kept for backcompatibility
|
SET(ACTUAL_3DPARTY_DIR "${ACTUAL_3RDPARTY_DIR}") # kept for backcompatibility
|
||||||
IF(EXISTS ${ACTUAL_3RDPARTY_DIR})
|
IF(EXISTS ${ACTUAL_3RDPARTY_DIR})
|
||||||
|
Loading…
Reference in New Issue
Block a user