summaryrefslogtreecommitdiff
path: root/swig/CMakeLists.txt
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-01-10 17:49:17 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-01-10 17:49:17 +0900
commit171a3544dc3167f64f2ac404bd1de643964cfe4d (patch)
tree14502e1cc0eeb8daf460f658159726ee4950012a /swig/CMakeLists.txt
parent62d346f929f5aea8b4c2e8021c3e91d8e3b2f6a7 (diff)
downloadlibzypp-bindings-171a3544dc3167f64f2ac404bd1de643964cfe4d.tar.gz
libzypp-bindings-171a3544dc3167f64f2ac404bd1de643964cfe4d.tar.bz2
libzypp-bindings-171a3544dc3167f64f2ac404bd1de643964cfe4d.zip
[Model] ALL [BinType] AP [Customer] OPEN [Issue#] N/A [Request] N/A [Occurrence Version] N/A [Problem] Version Upgrade [Cause & Measure] Version Upgrade [Checking Method] N/A [Team] Open Source Management and Setting Part [Developer] dh0128.kwak [Solution company] Samsung [Change Type] N/A Change-Id: I5982a7ed56be8eddbabf4c3adc60572d790c0313 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'swig/CMakeLists.txt')
-rw-r--r--swig/CMakeLists.txt39
1 files changed, 23 insertions, 16 deletions
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
index 251b5b5..400c894 100644
--- a/swig/CMakeLists.txt
+++ b/swig/CMakeLists.txt
@@ -19,19 +19,26 @@ OPTION(BUILD_PERL5_BINDINGS "Build Perl 5 bindings" ON)
# Let's see which target languages are available
#
-FIND_PACKAGE(Ruby)
-FIND_PACKAGE(PythonLibs)
-FIND_PACKAGE(Perl)
-
-
-IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
- ADD_SUBDIRECTORY(ruby)
-ENDIF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
-
-IF (PYTHON_LIBRARY)
- ADD_SUBDIRECTORY(python)
-ENDIF(PYTHON_LIBRARY)
-
-#IF (PERL_EXECUTABLE)
-# ADD_SUBDIRECTORY(perl5)
-#ENDIF (PERL_EXECUTABLE)
+IF(BUILD_RUBY_BINDINGS)
+ FIND_PACKAGE(Ruby)
+ IF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
+ ADD_SUBDIRECTORY(ruby)
+ ENDIF()
+ENDIF()
+
+IF(BUILD_PYTHON2_BINDINGS)
+ # Enforce Python 2.7, libzypp-bindings does not yet work with Python3
+ set(PythonLibs_FIND_VERSION 2.7)
+ set(PythonLibs_FIND_VERSION_MAJOR 2)
+ FIND_PACKAGE(PythonLibs)
+ IF(PYTHON_LIBRARY)
+ ADD_SUBDIRECTORY(python)
+ ENDIF()
+ENDIF()
+
+IF(BUILD_PERL5_BINDINGS)
+ FIND_PACKAGE(Perl)
+ IF(PERL_EXECUTABLE)
+ ADD_SUBDIRECTORY(perl5)
+ ENDIF()
+ENDIF()