Skip to content

Commit 4c74b22

Browse files
author
Alexander Widerberg
committed
Smaller tweak to the example when specifying the preferred install directory.
1 parent a49cd3f commit 4c74b22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

example/example-lib/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ else()
5454
message(STATUS "Building static version...")
5555
endif()
5656

57+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
58+
set(CMAKE_INSTALL_PREFIX ${example-ios_SOURCE_DIR}/../example-app/example-lib CACHE PATH "Install path" FORCE)
59+
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
60+
5761
# Executable
5862
#add_executable (helloworld main.cpp)
5963

@@ -64,6 +68,5 @@ endif()
6468
set_xcode_property(example GCC_GENERATE_DEBUGGING_SYMBOLS YES "All")
6569

6670
# Installation
67-
set(CMAKE_INSTALL_PREFIX "${example-ios_SOURCE_DIR}/../example-app/example-lib")
6871
install (TARGETS example DESTINATION lib)
6972
install (FILES ${HEADERS} DESTINATION include)

0 commit comments

Comments
 (0)