summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2012-04-20 01:42:28 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2012-04-20 01:42:28 (GMT)
commit41d7f36943ea759435e63ec656ab558cc3a320ca (patch)
treee1c15605e2bb3c7ec2755b5289221b765dd05352
parentc0a2200245e2265f0b6848b764497c613f47eb9a (diff)
downloadlibkolabxml-41d7f36943ea759435e63ec656ab558cc3a320ca.tar.gz
Remove unnecessary workarounds which can be solved by -DCMAKE_PREFIX_PATH=/usr/lib64/ as well.
-rw-r--r--CMakeLists.txt4
-rw-r--r--cmake/modules/FindKolabInternal.cmake12
-rw-r--r--src/python/CMakeLists.txt35
3 files changed, 5 insertions, 46 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa73e95..9e36c65 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,7 +64,7 @@ if (Boost_FOUND)
endif (Boost_FOUND)
if (${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.42)
- find_library(UUID NAMES ossp-uuid HINTS ${FIND_LIBRARY_PATHS})
+ find_library(UUID NAMES ossp-uuid)
if(UUID)
message("uuid found")
else (UUID)
@@ -81,7 +81,7 @@ else (XSDCXX)
"xsd code generator NOT found!")
endif(XSDCXX)
-find_library(XERCES_C NAMES xerces-c xerces-c_2 HINTS ${FIND_LIBRARY_PATHS})
+find_library(XERCES_C NAMES xerces-c xerces-c_2)
if(XERCES_C)
message("xerces found")
else (XERCES_C)
diff --git a/cmake/modules/FindKolabInternal.cmake b/cmake/modules/FindKolabInternal.cmake
index 6e0c4ca..b187875 100644
--- a/cmake/modules/FindKolabInternal.cmake
+++ b/cmake/modules/FindKolabInternal.cmake
@@ -28,18 +28,6 @@ else ()
endif()
endif ()
-#With cmake 2.6 on 64bit the libraries are not correctly detected, which is afaik a bug. Therefore we workaround the issue by providing some hints manually.
-if(FIND_LIBRARY_PATHS)
- message("FIND_LIBRARY_PATHS specified manually")
-else()
- set(FIND_LIBRARY_PATHS
- /usr/lib
- /usr/lib64
- /lib
- /lib64)
-endif()
-message("FIND_LIBRARY_PATHS: ${FIND_LIBRARY_PATHS}")
-
if(KOLAB_LIB_INSTALL_DIR)
message("KOLAB_LIB_INSTALL_DIR specified manually")
else()
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
index 042ed41..7646f69 100644
--- a/src/python/CMakeLists.txt
+++ b/src/python/CMakeLists.txt
@@ -3,43 +3,13 @@ include_directories(../)
# Compile Python Bindings
-#always run this for the macros
find_package(PythonLibs)
-#Allow to override automatic finding
-if (PYTHON_LIBRARY_OVERRIDE AND PYTHON_INCLUDE_DIR_OVERRIDE)
- message("python library specified manually")
- SET(PYTHON_LIBRARY ${PYTHON_LIBRARY_OVERRIDE})
- SET(PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR_OVERRIDE})
- SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY_OVERRIDE})
- SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR_OVERRIDE})
- SET(PYTHONLIBS_FOUND TRUE)
-else()
- if (NOT PYTHONLIBS_FOUND)
- message("trying to find python manually")
- set(_Python_VERSIONS 2.7 2.6 )
- FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
- STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
- find_library(PYTHON_LIBRARY NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION} HINTS ${FIND_LIBRARY_PATHS})
- if (PYTHON_LIBRARIES)
- FIND_PATH(PYTHON_INCLUDE_DIR
- NAMES Python.h
- PATH_SUFFIXES
- python${_CURRENT_VERSION}
- )
- SET(PYTHONLIBS_FOUND TRUE)
- SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY_OVERRIDE})
- SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR_OVERRIDE})
- endif()
- ENDFOREACH(_CURRENT_VERSION)
- endif()
-endif()
-
if (NOT PYTHONLIBS_FOUND)
message("python libs not found, not building python bindings")
- message("you can specify PYTHON_LIBRARY_OVERRIDE and PYTHON_INCLUDE_DIR_OVERRIDE manually")
return()
endif()
+message("found python include dirs: ${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH}")
set(KOLAB_SWIG_PYTHON_SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/python_kolabformat_wrapper.cpp)
set(KOLAB_SWIG_PYTHON_HEADER_FILE ${CMAKE_CURRENT_BINARY_DIR}/kolabformat.py)
@@ -54,7 +24,8 @@ add_custom_command(OUTPUT ${KOLAB_SWIG_PYTHON_SOURCE_FILE} ${KOLAB_SWIG_PYTHON_H
SET_SOURCE_FILES_PROPERTIES(${KOLAB_SWIG_PYTHON_SOURCE_FILE} PROPERTIES GENERATED 1)
-include_directories(${PYTHON_INCLUDE_DIRS})
+#${PYTHON_INCLUDE_PATH} is for backwards compatibility (el6)
+include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH})
set(PYTHON_MODULE_PREFIX "_")
python_add_module(kolabformat ${KOLAB_SWIG_PYTHON_SOURCE_FILE})