back to safe option for almost everyone.
This commit is contained in:
parent
96c7a962c9
commit
9e859f7991
@ -1,4 +1,4 @@
|
||||
option(NANA_CMAKE_INSTALL "Install nana when compile the library (to be consumed without cmake)" ON)
|
||||
option(NANA_CMAKE_INSTALL "Install nana after compiling the library (to be consumed WITHOUT cmake!!)" OFF)
|
||||
|
||||
# Install the include directories too.
|
||||
if(NANA_CMAKE_INSTALL)
|
||||
@ -7,6 +7,10 @@ if(NANA_CMAKE_INSTALL)
|
||||
# of the project linking to the nana lib here generated
|
||||
target_sources(nana PRIVATE ${HEADERS})
|
||||
message("The compiled Nana library will be installed in ${CMAKE_INSTALL_PREFIX}/lib")
|
||||
message("WARNING !!! You are using the 'installed' nana! Not recommended! ")
|
||||
message("If this was not your intention, please tern OFF option NANA_CMAKE_INSTALL ")
|
||||
message("for example by adding: -DNANA_CMAKE_INSTALL=OFF to your call to cmake. ")
|
||||
|
||||
# Actually in DESTDIR/CMAKE_INSTALL_PREFIX/lib but in windows there is no DESTDIR/ part.
|
||||
install(TARGETS nana
|
||||
ARCHIVE DESTINATION lib
|
||||
@ -18,6 +22,9 @@ if(NANA_CMAKE_INSTALL)
|
||||
$<INSTALL_INTERFACE:include> )
|
||||
else()
|
||||
# this is the prefered method to consume nana with cmake
|
||||
message("You are using nana directly from original sources. (Recommended!) "
|
||||
"If this was not your intention, and what you want is to install precomplied nana first, then "
|
||||
"please tern ON option NANA_CMAKE_INSTALL ")
|
||||
target_sources(nana PUBLIC ${HEADERS})
|
||||
target_include_directories(nana PUBLIC ${NANA_INCLUDE_DIR})
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user