summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2013-10-23 23:08:18 +0200
committerJohann Klähn <kljohann@gmail.com>2014-02-01 01:30:53 +0100
commit89c21e9967cec214597044aa582741470404977c (patch)
treef54c388e606e5f9296f991cae64678bdbaf0a8b2 /CMakeLists.txt
parent35c1bf03eca615ee747162c356c74ba280a6d03c (diff)
downloadfork-ledger-89c21e9967cec214597044aa582741470404977c.tar.gz
fork-ledger-89c21e9967cec214597044aa582741470404977c.tar.bz2
fork-ledger-89c21e9967cec214597044aa582741470404977c.zip
build shared library/python module, clean up CMake
libledger will now be built as a shared library. You can 'import ledger' from python IFF you copy libledger.so to ledger.so or create a symlink.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc2ef2bb..4cd56027 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,10 @@ endif()
find_package(PythonInterp) # Used for running tests
if(USE_PYTHON)
+ if(NOT BUILD_LIBRARY)
+ message(ERROR "Building the python module requires BUILD_LIBRARY=ON.")
+ endif()
+
set(Python_ADDITIONAL_VERSIONS 2.7 2.6)
find_package(PythonLibs)
if(PYTHONLIBS_FOUND)
@@ -232,9 +236,6 @@ find_opt_library_and_header(EDIT_PATH histedit.h EDIT_LIB edit HAVE_EDIT)
########################################################################
macro(add_ledger_library_dependencies _target)
- if(BUILD_LIBRARY)
- target_link_libraries(${_target} libledger)
- endif()
target_link_libraries(${_target} ${MPFR_LIB})
target_link_libraries(${_target} ${GMP_LIB})
if(HAVE_EDIT)