Skip to content

Commit 9002912

Browse files
committed
switch header file build dir and install them to installation directory
1 parent ea26d18 commit 9002912

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

src/librmessentials/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if (Qt6_FOUND)
9292
PUBLIC Qt6::Gui
9393
)
9494
endif()
95-
target_include_directories(RmEss6 PUBLIC ${CMAKE_BINARY_DIR}/dist/include)
95+
target_include_directories(RmEss6 PUBLIC ${CMAKE_BINARY_DIR}/build/include)
9696
rmessentials_win32_rc(RmEss6 false "")
9797

9898
install(TARGETS RmEss6
@@ -160,7 +160,7 @@ if (Qt5_FOUND)
160160
PUBLIC Qt5::Gui
161161
)
162162
endif()
163-
target_include_directories(RmEss5 PUBLIC ${CMAKE_BINARY_DIR}/dist/include)
163+
target_include_directories(RmEss5 PUBLIC ${CMAKE_BINARY_DIR}/build/include)
164164
rmessentials_win32_rc(RmEss5 false "")
165165

166166
install(TARGETS RmEss5

src/quazip/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ if (Qt6_FOUND)
6868
PUBLIC Qt6::Core
6969
PUBLIC Qt6::Core5Compat
7070
)
71-
target_include_directories(quazip6 INTERFACE ${CMAKE_BINARY_DIR}/dist/include)
71+
target_include_directories(quazip6 INTERFACE ${CMAKE_BINARY_DIR}/build/include)
7272

7373
if (RMESSENTIALS_USE_QUAZIP)
7474
install(TARGETS quazip6
@@ -108,7 +108,7 @@ if (Qt5_FOUND)
108108
target_link_libraries(quazip5
109109
PUBLIC Qt5::Core
110110
)
111-
target_include_directories(quazip5 INTERFACE ${CMAKE_BINARY_DIR}/dist/include)
111+
target_include_directories(quazip5 INTERFACE ${CMAKE_BINARY_DIR}/build/include)
112112

113113
if (RMESSENTIALS_USE_QUAZIP)
114114
install(TARGETS quazip5

src/xxtea/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if (NOT BUILD_SHARED_LIBS)
1818
target_compile_definitions(xxtea INTERFACE RMESSENTIALS_BUILD_STATIC_XXTEA)
1919
endif()
2020

21-
target_include_directories(xxtea INTERFACE ${CMAKE_BINARY_DIR}/dist/include)
21+
target_include_directories(xxtea INTERFACE ${CMAKE_BINARY_DIR}/build/include)
2222

2323
install(TARGETS xxtea
2424
RUNTIME

tools/AutoGenerateHeader.cmake

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,18 @@ if (DEFINED PROJECT_NAME)
5050
list(PREPEND header_generated_file_names "${header_file_name}")
5151
set(header_generated_paths)
5252
foreach (header_generated_file_name IN LISTS header_generated_file_names)
53-
list(APPEND header_generated_paths "${CMAKE_BINARY_DIR}/dist/include/${target}/${header_generated_file_name}")
53+
list(APPEND header_generated_paths "${CMAKE_BINARY_DIR}/build/include/${target}/${header_generated_file_name}")
5454
endforeach()
5555
add_custom_command(OUTPUT ${header_generated_paths}
5656
COMMAND "${CMAKE_COMMAND}" -P "${RMESSENTIALS_AUTO_GENERATE_HEADER_CMAKE_FILE}" "${header_path_absolute}" ${header_generated_paths}
5757
MAIN_DEPENDENCY "${header_file}"
5858
COMMENT "Generating header files \"${header_file}\"..."
5959
)
6060
target_sources("${target}" PRIVATE ${header_generated_paths})
61+
install(FILES ${header_generated_paths}
62+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${target}"
63+
OPTIONAL
64+
)
6165
endforeach()
6266
endfunction()
6367
else()

0 commit comments

Comments
 (0)