summaryrefslogtreecommitdiffhomepage
path: root/cmake/PopulateConfigVariablesLocally.cmake
diff options
context:
space:
mode:
authorAhmad Fatoum <[email protected]>2018-07-29 12:56:19 +0200
committerGitHub <[email protected]>2018-07-29 12:56:19 +0200
commit6905a875eda7e1ac85b768f5aa4e07dc92537bdb (patch)
treef8bf880840312d42478043a04bc7f273f892b180 /cmake/PopulateConfigVariablesLocally.cmake
parentcf021e38117723b655a2399e62f8d5f87ce3d413 (diff)
parent5a94a280d0a7d2866a12e6f9144401881e17de02 (diff)
downloadraylib-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.cmake11
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()