summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2014-02-01 10:37:52 +0100
committerJohann Klähn <kljohann@gmail.com>2014-02-01 12:00:32 +0100
commit6eeda8bcea1000793103bc6f9633ca5804ee01b2 (patch)
tree2994dba0e9727315fb33043a5cfe0f4d3ee37c9e /src/CMakeLists.txt
parent36b4fc3e2fdfaa332373230d73b7fdd4f5afa5e8 (diff)
downloadfork-ledger-6eeda8bcea1000793103bc6f9633ca5804ee01b2.tar.gz
fork-ledger-6eeda8bcea1000793103bc6f9633ca5804ee01b2.tar.bz2
fork-ledger-6eeda8bcea1000793103bc6f9633ca5804ee01b2.zip
Fix shared library and python module
Conflicts: src/CMakeLists.txt
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f229375c..65fd9c12 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -254,13 +254,23 @@ include(GNUInstallDirs)
if(BUILD_LIBRARY)
add_library(libledger SHARED ${LEDGER_SOURCES} ${PROJECT_SOURCE_DIR}/lib/sha1.cpp)
add_ledger_library_dependencies(libledger)
- set_property(TARGET libledger PROPERTY PREFIX "")
+ set_target_properties(libledger PROPERTIES
+ PREFIX ""
+ #INSTALL_NAME_DIR "@executable_path/../lib"
+ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+ VERSION ${Ledger_VERSION_MAJOR}
+ SOVERSION ${Ledger_VERSION_MAJOR})
add_executable(ledger main.cc global.cc)
target_link_libraries(ledger libledger)
install(TARGETS libledger DESTINATION ${CMAKE_INSTALL_LIBDIR})
- install(FILES ${LEDGER_INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ledger)
+ install(FILES ${LEDGER_INCLUDES}
+ ${PROJECT_SOURCE_DIR}/lib/sha1.h
+ ${PROJECT_SOURCE_DIR}/lib/utfcpp/source/utf8.h
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ledger)
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/lib/utfcpp/source/utf8
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ledger)
else()
add_executable(ledger
${LEDGER_SOURCES} ${PROJECT_SOURCE_DIR}/lib/sha1.cpp main.cc global.cc)
@@ -286,7 +296,6 @@ print(s.get_python_lib(True, prefix=''))"
install(
FILES "${CMAKE_BINARY_DIR}/${_ledger_python_module_name}"
DESTINATION ${PYTHON_SITE_PACKAGES})
-
else()
message(WARNING "PYTHON_SITE_PACKAGES not set. Will not install python module.")
endif()