File tree 2 files changed +5
-4
lines changed
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)
43
43
add_definitions (-DLIBIIO_STATIC=1)
44
44
endif ()
45
45
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)
47
48
option (OSX_PACKAGE "Create a OSX package" ON )
48
49
49
50
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
474
475
set_target_properties (iio PROPERTIES
475
476
VERSION ${VERSION}
476
477
SOVERSION ${LIBIIO_VERSION_MAJOR}
477
- FRAMEWORK TRUE
478
+ FRAMEWORK ${OSX_FRAMEWORK}
478
479
PUBLIC_HEADER ${LIBIIO_HEADERS}
479
480
C_STANDARD 99
480
481
C_STANDARD_REQUIRED ON
@@ -554,7 +555,7 @@ option(WITH_MAN "Generate on-line reference manuals (man pages)" OFF)
554
555
add_subdirectory (man)
555
556
556
557
# Create an installer if compiling for OSX
557
- if (OSX_PACKAGE)
558
+ if (OSX_PACKAGE AND OSX_FRAMEWORK )
558
559
set (LIBIIO_PKG ${CMAKE_CURRENT_BINARY_DIR} /libiio-${VERSION} .g${LIBIIO_VERSION_GIT} .pkg)
559
560
set (LIBIIO_TEMP_PKG ${CMAKE_CURRENT_BINARY_DIR} /libiio-${VERSION} -temp.pkg)
560
561
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
76
76
)
77
77
78
78
if (NOT SKIP_INSTALL_ALL)
79
- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
79
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND OSX_FRAMEWORK )
80
80
install (TARGETS ${IIO_TESTS_TARGETS} RUNTIME DESTINATION ${OSX_INSTALL_FRAMEWORKSDIR} /iio.framework /Tools)
81
81
else ()
82
82
install (TARGETS ${IIO_TESTS_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
You can’t perform that action at this time.
0 commit comments