write_cmakefile(...) does not process the parameter the parameter "library_dirs"

Issue #26 resolved
rambausek created an issue

I must admit I am not very familiar with cmake, so I do not know if this is intended or not, but since the parameter is there, I guess it is supposed to be used, and only forgotten due to not so common use.

Here is my hack, I guess you can do better than I did:

Add an entry "extra_library_dirs" to the form

 cmake_form["extra_libraries"] = ";".join(libraries)
 cmake_form["extra_library_dirs"] = ";".join(library_dirs) # added
 cmake_form["extra_include_dirs"] = ";".join(include_dirs)     
 cmake_form["extra_swig_include_dirs"] = " -I".join([" "] + swig_include_dirs)

And a patch...(added lines to the cmake template)

@@ -492,6 +511,11 @@ if(EXTRA_INCLUDE_DIRS)
 endif()
 %(package_include_dirs)s

+set(EXTRA_LIBRARY_DIRS \"%(extra_library_dirs)s\")
+if(EXTRA_LIBRARY_DIRS)
+  link_directories(${EXTRA_LIBRARY_DIRS})
+endif()
+
 %(package_flags)s

 %(extra_sources_files)s

Comments (4)

  1. Log in to comment