[CMake] Problem writing FindTPProto.cmake
Jure Repinc
jlp at holodeck1.com
Sat Nov 25 20:00:43 EST 2006
Hi,
I've just started working on a new project and I have decided to try
using CMake for it. The project depends on TPProto library so I also had
to write FindTPProto.cmake (file attached).
The problem is that when I run cmake on the folder with CMakeLists.txt
where I included the line:
find_package( TPProto REQUIRED )
I get this error:
CMake Error: TPProto_DIR is not set. It must be set to the directory
containing TPProtoConfig.cmake in order to use TPProto.
I have also moved FindTPProto.cmake to the folder where other
Find*.cmake files are. Now I don't know what is going wrong so any help
would be much appreciated. Thanks in advance.
--
JLP's Blog - http://jlp.holodeck1.com/blog/
-------------- next part --------------
FIND_PATH(TPPROTO_INCLUDE_DIR gamelayer.h /usr/include/tpproto /usr/local/include/tpproto)
FIND_LIBRARY(TPPROTO_LIBRARY NAMES tpproto PATHS /usr/lib /usr/local/lib)
IF (TPPROTO_INCLUDE_DIR AND TPPROTO_LIBRARY)
SET(TPPROTO_LIBRARIES ${TPPROTO_LIBRARY})
SET(TPPROTO_FOUND "YES")
ELSE (TPPROTO_INCLUDE_DIR AND TPPROTO_LIBRARY)
SET(TPPROTO_FOUND "NO")
ENDIF (TPPROTO_INCLUDE_DIR AND TPPROTO_LIBRARY)
IF (TPPROTO_FOUND)
IF (NOT TPProto_FIND_QUIETLY)
MESSAGE(STATUS "Found TPProto: ${TPPROTO_LIBRARY}")
ENDIF (NOT TPProto_FIND_QUIETLY)
ELSE (TPPROTO_FOUND)
IF (TPProto_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find TPProto")
ENDIF (TPProto_FIND_REQUIRED)
ENDIF (TPPROTO_FOUND)
More information about the CMake
mailing list