summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--k8055gui/CMakeLists.txt4
-rw-r--r--libk8055/CMakeLists.txt40
-rw-r--r--pyk8055/CMakeLists.txt2
3 files changed, 25 insertions, 21 deletions
diff --git a/k8055gui/CMakeLists.txt b/k8055gui/CMakeLists.txt
index 736080b..86cfdb4 100644
--- a/k8055gui/CMakeLists.txt
+++ b/k8055gui/CMakeLists.txt
@@ -2,7 +2,7 @@
ADD_EXECUTABLE(k8055gui WIN32 MACOSX_BUNDLE MyApp.cpp MyFrame.cpp )
TARGET_LINK_LIBRARIES(k8055gui
- k8055++-${VERSION}
+ k8055++
${wxWidgets_LIBRARIES}
)
@@ -13,7 +13,7 @@ INCLUDE_DIRECTORIES(
# ${wxWidgets_INCLUDE_DIRS}
)
-ADD_DEPENDENCIES(k8055gui k8055++-${VERSION})
+ADD_DEPENDENCIES(k8055gui k8055++)
INSTALL(TARGETS k8055gui RUNTIME DESTINATION bin BUNDLE DESTINATION bin )
diff --git a/libk8055/CMakeLists.txt b/libk8055/CMakeLists.txt
index bd6302b..df7803b 100644
--- a/libk8055/CMakeLists.txt
+++ b/libk8055/CMakeLists.txt
@@ -1,46 +1,50 @@
-ADD_LIBRARY( k8055-${VERSION} SHARED libk8055.c )
-ADD_LIBRARY( k8055-static-${VERSION} STATIC libk8055.c )
+ADD_LIBRARY( k8055 SHARED libk8055.c )
+ADD_LIBRARY( k8055-static STATIC libk8055.c )
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}
${LIBUSB_INCLUDE_DIR}
)
-TARGET_LINK_LIBRARIES( k8055-${VERSION}
+TARGET_LINK_LIBRARIES( k8055
${LIBUSB_LDFLAGS}
m
)
-SET_TARGET_PROPERTIES(k8055-${VERSION} PROPERTIES PUBLIC_HEADER k8055.h )
+SET_TARGET_PROPERTIES(k8055 PROPERTIES PUBLIC_HEADER k8055.h )
+SET_TARGET_PROPERTIES(k8055 PROPERTIES VERSION ${VERSION} SOVERSION ${VERSION_MAJOR})
-INSTALL(TARGETS k8055-${VERSION}
+INSTALL(TARGETS k8055
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include
)
-ADD_LIBRARY( k8055++-${VERSION} SHARED libk8055.cpp )
-ADD_DEPENDENCIES(k8055++-${VERSION} k8055-${VERSION})
-ADD_LIBRARY( k8055++-static-${VERSION} STATIC libk8055.cpp )
-ADD_DEPENDENCIES(k8055++-static-${VERSION} k8055-${VERSION})
+ADD_LIBRARY( k8055++ SHARED libk8055.cpp )
+ADD_DEPENDENCIES(k8055++ k8055)
+ADD_LIBRARY( k8055++-static STATIC libk8055.cpp )
+ADD_DEPENDENCIES(k8055++-static k8055)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
-TARGET_LINK_LIBRARIES( k8055++-${VERSION}
- k8055-${VERSION}
+TARGET_LINK_LIBRARIES( k8055++
+ k8055
)
-SET_TARGET_PROPERTIES(k8055++-${VERSION} PROPERTIES PUBLIC_HEADER k8055++.h )
+SET_TARGET_PROPERTIES(k8055++ PROPERTIES PUBLIC_HEADER k8055++.h )
+SET_TARGET_PROPERTIES(k8055++ PROPERTIES VERSION ${VERSION} SOVERSION ${VERSION_MAJOR})
-INSTALL(TARGETS k8055++-${VERSION}
+INSTALL(TARGETS k8055++
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include
)
-ADD_EXECUTABLE(k8055 WIN32 MACOSX_BUNDLE main.c )
-TARGET_LINK_LIBRARIES(k8055
- k8055-${VERSION}
+ADD_EXECUTABLE(k8055cmd WIN32 MACOSX_BUNDLE main.c )
+TARGET_LINK_LIBRARIES(k8055cmd
+ k8055
)
-ADD_DEPENDENCIES(k8055 k8055-${VERSION})
+ADD_DEPENDENCIES(k8055cmd k8055)
CONFIGURE_FILE(k8055.pc.in k8055.pc @ONLY)
-INSTALL(TARGETS k8055 RUNTIME DESTINATION bin BUNDLE DESTINATION bin )
+INSTALL(TARGETS k8055cmd RUNTIME DESTINATION bin BUNDLE DESTINATION bin )
+
INSTALL(FILES k8055.1.gz DESTINATION man/man1/ )
+
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/k8055.pc DESTINATION lib/pkgconfig )
diff --git a/pyk8055/CMakeLists.txt b/pyk8055/CMakeLists.txt
index db2e6b9..f7784f4 100644
--- a/pyk8055/CMakeLists.txt
+++ b/pyk8055/CMakeLists.txt
@@ -10,6 +10,6 @@ SET(CMAKE_SWIG_FLAGS "")
SET_SOURCE_FILES_PROPERTIES(libk8055.i PROPERTIES CPLUSPLUS OFF)
SET_SOURCE_FILES_PROPERTIES(libk8055.i PROPERTIES SWIG_FLAGS "-includeall")
SWIG_ADD_MODULE(pyk8055 python libk8055.i ${CMAKE_SOURCE_DIR}/libk8055/libk8055.c)
-SWIG_LINK_LIBRARIES(pyk8055 ${PYTHON_LIBRARIES} ${LIBUSB_LDFLAGS} k8055-${VERSION})
+SWIG_LINK_LIBRARIES(pyk8055 ${PYTHON_LIBRARIES} ${LIBUSB_LDFLAGS} k8055)
#pyuic frmk8055qt.ui -o frmk8055qt.py