nixpkgs/pkgs/desktops/kde-4.8/kdebindings/pykde4-hardcode-lib-python.patch
Yury G. Kudryashov 8899e60693 Remove unused patches, fix pykde4 patch
svn path=/nixpkgs/trunk/; revision=31712
2012-01-19 20:27:59 +00:00

19 lines
758 B
Diff

diff --git a/kpythonpluginfactory/CMakeLists.txt b/kpythonpluginfactory/CMakeLists.txt
index 41fa0fe..642d867 100644
--- a/kpythonpluginfactory/CMakeLists.txt
+++ b/kpythonpluginfactory/CMakeLists.txt
@@ -3,7 +3,12 @@
set(kpythonpluginfactory_SRCS
kpythonpluginfactory.cpp)
-GET_FILENAME_COMPONENT(LIB_PYTHON ${PYTHON_LIBRARY} NAME)
+option(HARDCODE_LIB_PYTHON_PATH "Whether the path to libpython.so should be hardcoded" OFF)
+if(HARDCODE_LIB_PYTHON_PATH)
+ get_filename_component(LIB_PYTHON ${PYTHON_LIBRARY} REALPATH)
+else(HARDCODE_LIB_PYTHON_PATH)
+ get_filename_component(LIB_PYTHON ${PYTHON_LIBRARY} NAME)
+endif(HARDCODE_LIB_PYTHON_PATH)
ADD_DEFINITIONS(-DLIB_PYTHON=\\"${LIB_PYTHON}\\")
ADD_DEFINITIONS(-DKDE_DEFAULT_DEBUG_AREA=15000)