diff options
author | John Wiegley <johnw@newartisans.com> | 2014-01-27 16:58:59 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2014-01-27 16:58:59 -0800 |
commit | 35c1bf03eca615ee747162c356c74ba280a6d03c (patch) | |
tree | 174b5c2a0cd9c843b30858272674f9a7e3fd2278 /src/CMakeLists.txt | |
parent | 61a466636b323066674abe72b4140840f4235d57 (diff) | |
parent | 7f96b654a7b084c1fcaf7fbbed9b69e0388fdeb3 (diff) | |
download | fork-ledger-35c1bf03eca615ee747162c356c74ba280a6d03c.tar.gz fork-ledger-35c1bf03eca615ee747162c356c74ba280a6d03c.tar.bz2 fork-ledger-35c1bf03eca615ee747162c356c74ba280a6d03c.zip |
Merge pull request #231 from afh/dev/pylib
Create shared python module
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() |