Reorganized UWAC headers

This commit is contained in:
Armin Novak 2022-02-16 11:10:02 +01:00 committed by akallabeth
parent 6ed50b4b1d
commit 5e11f0da28
7 changed files with 26 additions and 19 deletions

View File

@ -93,9 +93,12 @@ set(WAYLAND_FEATURE_DESCRIPTION "Wayland client")
set(WAYLAND_FEATURE_TYPE "REQUIRED") set(WAYLAND_FEATURE_TYPE "REQUIRED")
find_feature(Wayland ${WAYLAND_FEATURE_TYPE} ${WAYLAND_FEATURE_PURPOSE} ${WAYLAND_FEATURE_DESCRIPTION}) find_feature(Wayland ${WAYLAND_FEATURE_TYPE} ${WAYLAND_FEATURE_PURPOSE} ${WAYLAND_FEATURE_DESCRIPTION})
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/templates) set(UWAC_INCLUDE_DIR include/uwac${UWAC_API_VERSION})
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include)
add_subdirectory(libuwac) add_subdirectory(libuwac)
add_subdirectory(include)
add_subdirectory(templates) add_subdirectory(templates)
add_subdirectory(include)

View File

@ -15,5 +15,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
file(GLOB UWAC_HEADERS "uwac/*.h") install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
install(FILES ${UWAC_HEADERS} DESTINATION include/uwac${UWAC_API_VERSION}/uwac COMPONENT headers) DESTINATION ${UWAC_INCLUDE_DIR}
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
DESTINATION ${UWAC_INCLUDE_DIR}
FILES_MATCHING PATTERN "*.h")

View File

@ -60,7 +60,8 @@
#include <string.h> #include <string.h>
#include <sys/epoll.h> #include <sys/epoll.h>
#include "config.h" #include <uwac/config.h>
#include "uwac-os.h" #include "uwac-os.h"
#include "uwac-utils.h" #include "uwac-utils.h"

View File

@ -23,7 +23,7 @@
#ifndef UWAC_PRIV_H_ #ifndef UWAC_PRIV_H_
#define UWAC_PRIV_H_ #define UWAC_PRIV_H_
#include "config.h" #include <uwac/config.h>
#include <stdbool.h> #include <stdbool.h>
#include <wayland-client.h> #include <wayland-client.h>

View File

@ -22,7 +22,7 @@
* OF THIS SOFTWARE. * OF THIS SOFTWARE.
*/ */
#include "config.h" #include <uwac/config.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View File

@ -32,7 +32,7 @@
#include "uwac-utils.h" #include "uwac-utils.h"
#include "uwac-os.h" #include "uwac-os.h"
#include "config.h" #include <uwac/config.h>
#define UWAC_INITIAL_BUFFERS 3 #define UWAC_INITIAL_BUFFERS 3

View File

@ -15,7 +15,7 @@ write_basic_package_version_file(
VERSION ${UWAC_VERSION} VERSION ${UWAC_VERSION}
COMPATIBILITY SameMajorVersion) COMPATIBILITY SameMajorVersion)
install(FILES install(FILES
${CMAKE_CURRENT_BINARY_DIR}/uwacConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/uwacConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/uwacConfigVersion.cmake ${CMAKE_CURRENT_BINARY_DIR}/uwacConfigVersion.cmake
DESTINATION ${UWAC_CMAKE_INSTALL_DIR}) DESTINATION ${UWAC_CMAKE_INSTALL_DIR})
@ -30,15 +30,12 @@ FOREACH(var ${res})
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
string(REPLACE ";" " " UWAC_BUILD_CONFIG "${UWAC_BUILD_CONFIG_LIST}") string(REPLACE ";" " " UWAC_BUILD_CONFIG "${UWAC_BUILD_CONFIG_LIST}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/version.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/buildflags.h) configure_file(buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/buildflags.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/build-config.h) configure_file(build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/build-config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/uwac.pc.in ${CMAKE_CURRENT_BINARY_DIR}/uwac${UWAC_VERSION_MAJOR}.pc @ONLY)
set(UWAC_INSTALL_INCLUDE_DIR include/uwac${UWAC_API_VERSION}/uwac) configure_file(uwac.pc.in ${CMAKE_CURRENT_BINARY_DIR}/uwac${UWAC_VERSION_MAJOR}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version.h DESTINATION ${UWAC_INSTALL_INCLUDE_DIR} COMPONENT headers)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION ${UWAC_INSTALL_INCLUDE_DIR} COMPONENT headers) set(UWAC_INSTALL_INCLUDE_DIR ${UWAC_INCLUDE_DIR}/uwac)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/build-config.h DESTINATION ${UWAC_INSTALL_INCLUDE_DIR} COMPONENT headers)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/buildflags.h DESTINATION ${UWAC_INSTALL_INCLUDE_DIR} COMPONENT headers)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/uwac${UWAC_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/uwac${UWAC_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)