diff options
| author | Ahmad Fatoum <[email protected]> | 2018-07-29 12:56:19 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-07-29 12:56:19 +0200 |
| commit | 6905a875eda7e1ac85b768f5aa4e07dc92537bdb (patch) | |
| tree | f8bf880840312d42478043a04bc7f273f892b180 /cmake/PopulateConfigVariablesLocally.cmake | |
| parent | cf021e38117723b655a2399e62f8d5f87ce3d413 (diff) | |
| parent | 5a94a280d0a7d2866a12e6f9144401881e17de02 (diff) | |
| download | raylib-6905a875eda7e1ac85b768f5aa4e07dc92537bdb.tar.gz raylib-6905a875eda7e1ac85b768f5aa4e07dc92537bdb.zip | |
Merge pull request #608 from a3f/master
CMake: Major cleanup to support find_package(raylib)
Diffstat (limited to 'cmake/PopulateConfigVariablesLocally.cmake')
| -rw-r--r-- | cmake/PopulateConfigVariablesLocally.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/PopulateConfigVariablesLocally.cmake b/cmake/PopulateConfigVariablesLocally.cmake new file mode 100644 index 00000000..151070ea --- /dev/null +++ b/cmake/PopulateConfigVariablesLocally.cmake @@ -0,0 +1,11 @@ +macro(populate_config_variables_locally target) + get_property(raylib_INCLUDE_DIRS TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES) + #get_property(raylib_LIBRARIES TARGET ${target} PROPERTY LOCATION) # only works for SHARED + get_property(raylib_LDFLAGS TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES) + get_property(raylib_DEFINITIONS TARGET ${target} PROPERTY DEFINITIONS) + + set(raylib_INCLUDE_DIRS "${raylib_INCLUDE_DIRS}" PARENT_SCOPE) + #set(raylib_LIBRARIES "${raylib_INCLUDE_DIRS}" PARENT_SCOPE) + set(raylib_LDFLAGS "${raylib_LDFLAGS}" PARENT_SCOPE) + set(raylib_DEFINITIONS "${raylib_DEFINITIONS}" PARENT_SCOPE) +endmacro() |
