File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ if (NOT BUILD_SHARED_LIBS)
4343 add_definitions (-DLIBIIO_STATIC=1)
4444endif ()
4545
46- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
46+ option (OSX_FRAMEWORK "Create a OSX_FRAMEWORK" ON )
47+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND OSX_FRAMEWORK)
4748 option (OSX_PACKAGE "Create a OSX package" ON )
4849
4950 set (OSX_INSTALL_FRAMEWORKSDIR "/Library/Frameworks" CACHE STRING "Installation directory for frameworks" )
@@ -474,7 +475,7 @@ add_library(iio ${LIBIIO_CFILES} ${LIBIIO_HEADERS} ${LIBIIO_EXTRA_HEADERS} ${LIB
474475set_target_properties (iio PROPERTIES
475476 VERSION ${VERSION}
476477 SOVERSION ${LIBIIO_VERSION_MAJOR}
477- FRAMEWORK TRUE
478+ FRAMEWORK ${OSX_FRAMEWORK}
478479 PUBLIC_HEADER ${LIBIIO_HEADERS}
479480 C_STANDARD 99
480481 C_STANDARD_REQUIRED ON
@@ -554,7 +555,7 @@ option(WITH_MAN "Generate on-line reference manuals (man pages)" OFF)
554555add_subdirectory (man)
555556
556557# Create an installer if compiling for OSX
557- if (OSX_PACKAGE)
558+ if (OSX_PACKAGE AND OSX_FRAMEWORK )
558559 set (LIBIIO_PKG ${CMAKE_CURRENT_BINARY_DIR} /libiio-${VERSION} .g${LIBIIO_VERSION_GIT} .pkg)
559560 set (LIBIIO_TEMP_PKG ${CMAKE_CURRENT_BINARY_DIR} /libiio-${VERSION} -temp.pkg)
560561 set (LIBIIO_DISTRIBUTION_XML ${CMAKE_CURRENT_BINARY_DIR} /Distribution.xml)
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ set_target_properties(${IIO_TESTS_TARGETS} iio_tests_helper PROPERTIES
7676)
7777
7878if (NOT SKIP_INSTALL_ALL)
79- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
79+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND OSX_FRAMEWORK )
8080 install (TARGETS ${IIO_TESTS_TARGETS} RUNTIME DESTINATION ${OSX_INSTALL_FRAMEWORKSDIR} /iio.framework /Tools)
8181 else ()
8282 install (TARGETS ${IIO_TESTS_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
You can’t perform that action at this time.
0 commit comments