]> sigrok.org Git - pulseview.git/commitdiff
CMakeLists.txt: For Android, make a library out of the native code
authorMarcus Comstedt <redacted>
Wed, 16 Jul 2014 14:07:45 +0000 (16:07 +0200)
committerUwe Hermann <redacted>
Tue, 26 Aug 2014 20:45:41 +0000 (22:45 +0200)
.gitignore
CMakeLists.txt

index a673c5f6e3bf388f12e61eb9925c5d18de83e8ec..dc8ab9c692b71688daf100bd72efee261978f56d 100644 (file)
@@ -3,6 +3,7 @@
 
 pulseview
 pulseview-test
+libpulseview.so
 
 # CMake cruft
 *.cmake
index 40e61e22a1f2d0c1679a4f6b63e9766499424461..b9654940d21acf9d1b5c5e6f3dd900f31fc1f9ca 100644 (file)
@@ -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})