Created
November 5, 2015 04:20
-
-
Save marcinwol/af69cf83bb6582bc3fc7 to your computer and use it in GitHub Desktop.
Revisions
-
marcinwol created this gist
Nov 5, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ cmake_minimum_required(VERSION 3.3) project(boost_python_example) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(SOURCE_FILES main.cpp) find_package(Boost COMPONENTS python REQUIRED) include_directories(${Boost_INCLUDE_DIRS}) find_package(PythonLibs 3.4 REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) add_library(boost_python_example SHARED main.cpp) target_link_libraries(boost_python_example boost_python-py34 # ${Boost_LIBRARIES} does not work, as it takes 2.7 only for some reason. ${PYTHON_LIBRARIES})