Skip to content

Commit af09e1e

Browse files
committed
Added install target to cmake builds
1 parent cc734bf commit af09e1e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Release/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ elseif(UNIX) # This includes OSX
7171
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
7272
option(BUILD_TESTS "Build tests." ON)
7373
option(BUILD_SAMPLES "Build samples." ON)
74+
option(CASA_INSTALL_HEADERS "Install header files." ON)
75+
if(CASA_INSTALL_HEADERS)
76+
file(GLOB_RECURSE CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h)
77+
install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest)
78+
file(GLOB_RECURSE CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h)
79+
install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx)
80+
file(GLOB_RECURSE CASA_HEADERS_COMPAT include/compat/*.hpp include/compat/*.h)
81+
install(FILES ${CASA_HEADERS_COMPAT} DESTINATION include/compat)
82+
endif()
7483
elseif(WIN32)
7584
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
7685
option(BUILD_TESTS "Build tests." ON)
@@ -169,4 +178,3 @@ endif()
169178
if(BUILD_SAMPLES)
170179
add_subdirectory(samples)
171180
endif()
172-

Release/src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,6 @@ elseif(ANDROID)
108108
else()
109109
set_target_properties(${Casablanca_LIBRARY} PROPERTIES
110110
SOVERSION ${CPPREST_VERSION_MAJOR}.${CPPREST_VERSION_MINOR})
111+
112+
install(TARGETS ${Casablanca_LIBRARY} LIBRARY DESTINATION lib)
111113
endif()

0 commit comments

Comments
 (0)