Created
November 5, 2015 04:20
-
-
Save marcinwol/af69cf83bb6582bc3fc7 to your computer and use it in GitHub Desktop.
CMakeList.txt for ubuntu and bython boost
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 characters
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}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment