init
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
|
||||
#
|
||||
# Disabled until it behaves gracefully on a system without Python dll
|
||||
#
|
||||
RETURN()
|
||||
|
||||
PROJECT(openvibe-py3-check)
|
||||
|
||||
SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
|
||||
SET(PROJECT_VERSION ${OV_GLOBAL_VERSION_STRING})
|
||||
|
||||
FILE(GLOB_RECURSE SRC_FILES src/*.cpp src/*.h src/*.inl)
|
||||
ADD_EXECUTABLE(${PROJECT_NAME} ${SRC_FILES})
|
||||
SET_PROPERTY(TARGET ${PROJECT_NAME} PROPERTY FOLDER ${APP_FOLDER})
|
||||
INCLUDE("FindThirdPartyPython3")
|
||||
|
||||
# ---------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
# ---------------------------------
|
||||
|
||||
if(WIN32)
|
||||
add_definitions("-DWIN32")
|
||||
endif()
|
||||
# ----------------------
|
||||
# Generate launch script
|
||||
# ----------------------
|
||||
OV_INSTALL_LAUNCH_SCRIPT(SCRIPT_PREFIX "openvibe-py3-check" EXECUTABLE_NAME "${PROJECT_NAME}" PAUSE)
|
||||
|
||||
# -----------------------------
|
||||
# Install files
|
||||
# -----------------------------
|
||||
INSTALL(TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION ${DIST_BINDIR}
|
||||
LIBRARY DESTINATION ${DIST_LIBDIR}
|
||||
ARCHIVE DESTINATION ${DIST_LIBDIR})
|
||||
@@ -0,0 +1,25 @@
|
||||
#if defined(WIN32) && !defined(TARGET_BUILDTYPE_Debug) && defined TARGET_HAS_ThirdPartyPython3
|
||||
//&& defined(PY_MAJOR_VERSION) && (PY_MAJOR_VERSION == 3)
|
||||
#include <Python.h>
|
||||
#define PYCHECK
|
||||
#else
|
||||
#pragma message ("WARNING: Python 3.x headers are required to build the Python plugin, different includes found, skipped")
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// std::cout << "hello" << std::endl;
|
||||
#ifdef PYCHECK
|
||||
// std::cout << "hello1" << std::endl;
|
||||
Py_Initialize();
|
||||
// std::cout << "hello2" << std::endl;
|
||||
Py_Finalize();
|
||||
// std::cout << "hello3" << std::endl;
|
||||
return 0;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user