[CMake] swig and LINK_DIRECTORIES
Karl Merkley
karl at elemtech.com
Fri Feb 9 13:30:21 EST 2007
I have a file that I am swigging that needs to be linked with files
that reside someplace else on the OS. How can I get the UseSWIG to
look for the libraries in the correct place?
Below is a truncated CMakeLists.txt that approximates what I am
trying to do.
PROJECT(nurbs)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
FIND_PACKAGE(PythonLibs REQUIRED)
INCLUDE(UseACIS.cmake)
SET SOURCE_FILE_PROPERTIES(nurbs.i PROPERTIES CPLUSPLUS ON
OBJECT_DEPENDS nurbs.hpp)
SWIG_ADD_MODULE(nurbs python nurbs.i nurbs.hpp)
LINK_DIRECTORIES( ${ACIS_LIBRARY_DIR}) #this doesn't work!
SWIG_LINK_LIBRARIES(nurbs ${PYTHON_LIBRARIES} ${ACIS_LIBS})
Thanks,
Karl
More information about the CMake
mailing list