From: Marcus Comstedt Date: Wed, 16 Jul 2014 14:07:45 +0000 (+0200) Subject: CMakeLists.txt: For Android, make a library out of the native code X-Git-Tag: pulseview-0.3.0~570 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=268070612773203845e9b24cb3052158d7548980;p=pulseview.git CMakeLists.txt: For Android, make a library out of the native code --- diff --git a/.gitignore b/.gitignore index a673c5f6..dc8ab9c6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ pulseview pulseview-test +libpulseview.so # CMake cruft *.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 40e61e22..b9654940 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,12 +333,21 @@ if(WIN32) list(APPEND PULSEVIEW_LINK_LIBS "-lqsvg") endif() +if(ANDROID) +add_library(${PROJECT_NAME} SHARED + ${pulseview_SOURCES} + ${pulseview_HEADERS_MOC} + ${pulseview_FORMS_HEADERS} + ${pulseview_RESOURCES_RCC} +) +else() add_executable(${PROJECT_NAME} ${pulseview_SOURCES} ${pulseview_HEADERS_MOC} ${pulseview_FORMS_HEADERS} ${pulseview_RESOURCES_RCC} ) +endif() target_link_libraries(${PROJECT_NAME} ${PULSEVIEW_LINK_LIBS})