Skip to content

Instantly share code, notes, and snippets.

@fpersson
Created December 30, 2011 19:49
Show Gist options
  • Save fpersson/1541202 to your computer and use it in GitHub Desktop.
Save fpersson/1541202 to your computer and use it in GitHub Desktop.
Minimal CMakeLists for boost python
cmake_minimum_required (VERSION 2.8)
project(demo)
find_package(Boost 1.4.2)
find_package(Boost COMPONENTS python REQUIRED)
find_package(PythonLibs REQUIRED)
include_directories(${Boost_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS})
set(CORELIBS ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
add_executable(demo ${CORELIBS} ./main.cpp)
target_link_libraries(demo ${CORELIBS})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment