diff options
author | Vasilii Chernov <vchernov@inr.ru> | 2016-02-17 11:01:22 +0100 |
---|---|---|
committer | Vasilii Chernov <vchernov@inr.ru> | 2016-02-17 11:01:22 +0100 |
commit | 3269dce32883e14b45cc490a0cc0037b4c808a68 (patch) | |
tree | ad4a551ac5ccfb8ed74d01095c7dad00c532c84c /CMakeLists.txt | |
parent | ed9d8f285f4d81e1ce8bb5e7a5b9e471a73c1590 (diff) | |
download | pcitool-3269dce32883e14b45cc490a0cc0037b4c808a68.tar.gz pcitool-3269dce32883e14b45cc490a0cc0037b4c808a68.tar.bz2 pcitool-3269dce32883e14b45cc490a0cc0037b4c808a68.tar.xz pcitool-3269dce32883e14b45cc490a0cc0037b4c808a68.zip |
1. Add cmake BUILD_PYTHON_MODULES option.
2. Rename log options getting functions.
3. py:
- pcilib_init_py() - extract pcilib_py_add_script_dir()
- pcilib_py_init_script() - extract view-specialized code to
pcilib_py_get_transform_script_properties()
3. pcilib_open():
- move pcilib_init_py() to previous position.
- add extract pcilib_py_add_script_dir()
4. pcilib_script_s - change hash key. Now it is (const char*) and contains
script file name with extension
5. pcipywrap:
- Add pcipywrap.h to remove swig generated file complile warnings
- remove -includeall swig flag to prevent crash in multi-thread scripts
- change set python expetion mechanic
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e5c8b82..846623f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,8 @@ cmake_minimum_required(VERSION 2.8) #set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH true) #set(CMAKE_PREFIX_PATH ${CMAKE_SYSTEM_PREFIX_PATH}) -set(DISABLE_PCITOOL FALSE CACHE BOOL "Build only the library") +set(DISABLE_PCITOOL FALSE CACHE BOOL "Build only the library") +set(BUILD_PYTHON_MODULES FALSE CACHE BOOL "Build pcilib python modules") #list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") @@ -35,8 +36,12 @@ SET(ENV{PKG_CONFIG_PATH} "${LIB_INSTALL_DIR}/pkgconfig:$ENV{PKG_CONFIG_PATH}") find_package(PkgConfig REQUIRED) find_package(Threads REQUIRED) -find_package(PythonLibs 2.7 REQUIRED) -find_package(SWIG REQUIRED) + +if (BUILD_PYTHON_MODULES) + find_package(PythonLibs 2.7 REQUIRED) + find_package(SWIG REQUIRED) + add_definitions(-DBUILD_PYTHON_MODULES) +endif (BUILD_PYTHON_MODULES) set(EXTRA_SYSTEM_LIBS -lrt) @@ -79,11 +84,14 @@ add_subdirectory(dma) add_subdirectory(protocols) add_subdirectory(views) add_subdirectory(pcilib) -add_subdirectory(pywrap) add_subdirectory(pcitool) add_subdirectory(apps) add_subdirectory(xml) +if (BUILD_PYTHON_MODULES) + add_subdirectory(pywrap) +endif (BUILD_PYTHON_MODULES) + set_target_properties(pcilib PROPERTIES VERSION ${PCILIB_VERSION} SOVERSION ${PCILIB_ABI_VERSION} |