Skip to content

Commit

Permalink
Move header files to namespace subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
jaagr committed Oct 24, 2016
1 parent 58d0fe3 commit bf55ef9
Show file tree
Hide file tree
Showing 30 changed files with 8 additions and 14 deletions.
21 changes: 8 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if(NOT PYTHON_EXECUTABLE)
endif()

set(XPP_INCLUDE_DIRS
${PROJECT_SOURCE_DIR}/include
${X11_INCLUDE_DIRS}
${X11_XCB_INCLUDE_DIR}
${XCB_XCB_INCLUDE_DIR}
Expand Down Expand Up @@ -129,26 +130,20 @@ endforeach(PROTO_RAW)
#
# Create project lib and commands
#
file(GLOB HEADER_FILES include/*.hpp)
file(GLOB_RECURSE HEADER_FILES ${PROJECT_SOURCE_DIR}/include/*.hpp)
add_library(${PROJECT_NAME} ${HEADER_FILES})

set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)

target_include_directories(${PROJECT_NAME} PUBLIC
${PROJECT_SOURCE_DIR}/include
${X11_INCLUDE_DIRS}
${X11_XCB_INCLUDE_DIR}
${XCB_XCB_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} PUBLIC ${XPP_INCLUDE_DIRS})
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include/xpp)
target_link_libraries(${PROJECT_NAME} PRIVATE ${XPP_LIBRARIES})

target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wpedantic)
target_compile_options(${PROJECT_NAME} PRIVATE -std=c++14 -Wall -Wpedantic)
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:-g3 -DDEBUG>)
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Release>:-O3 -Wno-unused-variable>)

target_compile_definitions(${PROJECT_NAME} PUBLIC ${X11_XCB_DEFINITIONS} ${XCB_DEFINITIONS})

set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(${PROJECT_NAME} ${XPP_LIBRARIES})

#
# Add commands
Expand All @@ -158,7 +153,7 @@ foreach(PROTO ${PROTO_LIST})
add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
# FIXME: Find replacement for the hardcoded paths
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/generators/cpp_client.py -p "${PYTHON_XCBGEN}"
/usr/share/xcb/${PROTO}.xml > ${PROJECT_SOURCE_DIR}/include/proto/${PROTO_OUTPUT}.hpp)
/usr/share/xcb/${PROTO}.xml > ${PROJECT_SOURCE_DIR}/include/xpp/proto/${PROTO_OUTPUT}.hpp)
endforeach(PROTO)

#
Expand All @@ -167,6 +162,6 @@ endforeach(PROTO)
get_directory_property(HAS_PARENT PARENT_DIRECTORY)

if(HAS_PARENT)
set(XPP_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/include PARENT_SCOPE)
set(XPP_INCLUDE_DIRS ${XPP_INCLUDE_DIRS} PARENT_SCOPE)
set(XPP_LIBRARIES ${PROJECT_NAME} PARENT_SCOPE)
endif()
1 change: 0 additions & 1 deletion include/xpp

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bf55ef9

Please sign in to comment.