Adding an error check on version parsing of main CMakeLists

This commit is contained in:
manuelk 2013-11-18 16:02:27 -08:00
parent 32fe4c54a4
commit fdfdb1cc8b

View File

@ -32,6 +32,8 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/opensubdiv/version.h")
file(STRINGS "${CMAKE_SOURCE_DIR}/opensubdiv/version.h"
OpenSubdiv_VERSION REGEX "^#define OPENSUBDIV_VERSION .*$")
string(REPLACE "#define OPENSUBDIV_VERSION " "" OpenSubdiv_VERSION ${OpenSubdiv_VERSION})
else()
error("Cannot locate opensubdiv/version.h in CMAKE_SOURCE_DIR")
endif()
#-------------------------------------------------------------------------------