aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt12
-rw-r--r--main.cpp34
-rw-r--r--tests/samplebinding/CMakeLists.txt2
3 files changed, 41 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6641513fa..28470eb94 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,9 @@ target_link_libraries(shiboken_generator
${QT_QTXML_LIBRARY}
-lgenrunner) # FIXME libgenrunner needs a cmake FindPkg script!
+add_executable(shiboken main.cpp)
+target_link_libraries(shiboken ${QT_QTCORE_LIBRARY})
+
# uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
@@ -47,17 +50,14 @@ enable_testing()
add_subdirectory(libshiboken)
add_subdirectory(tests)
-# "make dist", in fact "make package_source"
-#set(CPACK_SOURCE_PACKAGE_FILE_NAME "shiboken-${shiboken_VERSION}")
-#set(CPACK_SOURCE_GENERATOR TGZ)
-#set(CPACK_SOURCE_IGNORE_FILES "~$" ".svn" "debian/" "build/" ".swp$" "*.kdev4")
-#include(CPack)
-
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${shiboken_VERSION})
add_custom_target(dist
COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
| bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+add_dependencies(shiboken shiboken_generator)
+
install(TARGETS shiboken_generator DESTINATION ${LIB_INSTALL_DIR})
+install(TARGETS shiboken DESTINATION bin)
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 000000000..6ca7da537
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,34 @@
+/*
+ * This file is part of the Boost Python Generator project.
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * Contact: PySide team <contact@pyside.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <QtCore>
+
+int main(int argc, char *argv[])
+{
+ QStringList args;
+ args.append("--generatorSet=shiboken");
+ for (int i = 1; i < argc; i++)
+ args.append(argv[i]);
+ return QProcess::execute("generatorrunner", args);
+}
+
diff --git a/tests/samplebinding/CMakeLists.txt b/tests/samplebinding/CMakeLists.txt
index 08c8ee7ff..67ca34313 100644
--- a/tests/samplebinding/CMakeLists.txt
+++ b/tests/samplebinding/CMakeLists.txt
@@ -46,5 +46,5 @@ target_link_libraries(sample
${PYTHON_LIBRARIES}
libshiboken)
-add_dependencies(sample shiboken)
+add_dependencies(sample shiboken_generator)