diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2014-01-27 21:06:44 +0100 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2014-01-27 21:06:44 +0100 |
commit | 82486f6d43d1a3f85ddbf2e65bcc919b56a63e20 (patch) | |
tree | 340a6770ab87428a5594c2b6d5f9920df23bb415 /src/CMakeLists.txt | |
parent | 61a466636b323066674abe72b4140840f4235d57 (diff) | |
download | fork-ledger-82486f6d43d1a3f85ddbf2e65bcc919b56a63e20.tar.gz fork-ledger-82486f6d43d1a3f85ddbf2e65bcc919b56a63e20.tar.bz2 fork-ledger-82486f6d43d1a3f85ddbf2e65bcc919b56a63e20.zip |
Build and shared python module
when building library
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9fd7d295..c6a9e28e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -244,11 +244,20 @@ endif() add_pch_rule(${PROJECT_BINARY_DIR}/system.hh LEDGER_SOURCES main.cc global.cc) if(BUILD_LIBRARY) + add_library(pyledger SHARED ${LEDGER_SOURCES}) + add_ledger_library_dependencies(pyledger) + if(CMAKE_HOST_APPLE) + set_target_properties(pyledger PROPERTIES OUTPUT_NAME ledger) + set_target_properties(pyledger PROPERTIES SUFFIX .so) + set(CMAKE_SHARED_LIBRARY_PREFIX ) + endif() + add_library(libledger ${LEDGER_SOURCES} ${PROJECT_SOURCE_DIR}/lib/sha1.cpp) set_target_properties(libledger PROPERTIES OUTPUT_NAME ledger) add_executable(ledger main.cc global.cc) + install(TARGETS pyledger DESTINATION lib) install(TARGETS libledger DESTINATION lib) install(FILES ${LEDGER_INCLUDES} DESTINATION include/ledger) else() |