This commit is contained in:
Diego Rodriguez-Losada 2016-04-01 00:31:53 +00:00
commit 73b5ff633d
5 changed files with 62 additions and 1 deletions

2
.gitignore vendored
View File

@ -80,3 +80,5 @@ tests/version
tests/vulkan tests/vulkan
tests/windows tests/windows
bii
bin

View File

@ -376,6 +376,11 @@ configure_file(src/glfw3.pc.in src/glfw3.pc @ONLY)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
add_subdirectory(src) add_subdirectory(src)
IF(BIICODE)
INCLUDE(biicode.cmake)
return ()
ENDIF()
if (GLFW_BUILD_EXAMPLES) if (GLFW_BUILD_EXAMPLES)
add_subdirectory(examples) add_subdirectory(examples)
endif() endif()
@ -416,4 +421,3 @@ if (GLFW_INSTALL)
"${GLFW_BINARY_DIR}/cmake_uninstall.cmake") "${GLFW_BINARY_DIR}/cmake_uninstall.cmake")
endif() endif()
endif() endif()

View File

@ -31,6 +31,13 @@ See the
guide in the GLFW documentation. guide in the GLFW documentation.
### Using GLFW with biicode
GLFW is available at [biicode](http://www.biicode.com) C/C++ dependency
manager, you can find the [block here](http://www.biicode.com/diego/glfw), and
[examples of use here](http://docs.biicode.com/c++/examples/glfw.html)
## Reporting bugs ## Reporting bugs
Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues). Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).

26
biicode.cmake Normal file
View File

@ -0,0 +1,26 @@
INIT_BIICODE_BLOCK()
#Biicode defines its own targets. Include src CMakeLists to load variables
#with the adequate source files depending on the system
FOREACH(var ${BII_LIB_SRC})
STRING(REGEX MATCH "deps/.*\\.c" item ${var})
IF(item)
LIST(APPEND glfw_deps_SOURCES ${var})
ENDIF()
ENDFOREACH()
SET(BII_LIB_SRC)
SET(BII_LIB_DEPS glfw ${glfw_LIBRARIES})
if(glfw_deps_SOURCES)
SET(BII_BLOCK_TARGET "${BII_BLOCK_USER}_${BII_BLOCK_NAME}_interface")
ADD_LIBRARY(glfw_deps ${glfw_deps_SOURCES})
target_include_directories(glfw_deps PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/deps)
SET(BII_LIB_DEPS ${BII_LIB_DEPS} glfw_deps)
endif()
# This defines the library (static), tests and examples executables
ADD_BIICODE_TARGETS()
# to make transitive the location of includes
target_include_directories(${BII_LIB_TARGET} INTERFACE ${GLFW_BINARY_DIR}/src)

22
biicode.conf Normal file
View File

@ -0,0 +1,22 @@
# Biicode configuration file
[requirements]
[parent]
diego/glfw: 2
[paths]
# locations in which biicode should look for includes
deps
include
[dependencies]
# The main headers depend on all sources, and the src/CMakeLists.txt
*glfw*.h + include/* src/* CMake/* *.in COPYING.txt
# This has to be made explicit to avoid detection of dependency to system getopt.h
deps/getopt.c + deps/getopt.h
tests/* + deps/getopt.h
examples/* + deps/getopt.h
examples/boing.c - tests/*
[tests]
tests/*