mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
update bx.cmake to include platform specific headers in target install include paths (#76)
This commit is contained in:
committed by
GitHub
parent
533a39f02e
commit
4f650b6bba
@@ -35,20 +35,31 @@ if( WIN32 )
|
||||
target_link_libraries( bx PUBLIC psapi )
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Add include directory of bx
|
||||
target_include_directories( bx
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${BX_DIR}/include>
|
||||
$<BUILD_INTERFACE:${BX_DIR}/3rdparty>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> )
|
||||
|
||||
# Build system specific configurations
|
||||
if( MSVC )
|
||||
target_include_directories( bx PUBLIC $<BUILD_INTERFACE:${BX_DIR}/include/compat/msvc> )
|
||||
target_include_directories( bx
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${BX_DIR}/include/compat/msvc>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/compat/msvc> )
|
||||
elseif( MINGW )
|
||||
target_include_directories( bx PUBLIC $<BUILD_INTERFACE:${BX_DIR}/include/compat/mingw> )
|
||||
target_include_directories( bx
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${BX_DIR}/include/compat/mingw>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/compat/mingw> )
|
||||
elseif( APPLE )
|
||||
target_include_directories( bx PUBLIC $<BUILD_INTERFACE:${BX_DIR}/include/compat/osx> )
|
||||
target_include_directories( bx
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${BX_DIR}/include/compat/osx>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/compat/osx> )
|
||||
endif()
|
||||
|
||||
# All configurations
|
||||
|
||||
Reference in New Issue
Block a user