Created
May 12, 2015 10:08
-
-
Save wakita/c318795344544fb2db41 to your computer and use it in GitHub Desktop.
glLoadGen 2.0.2 用の CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.1) | |
set(CMAKE_BUILD_TYPE Debug) | |
macro(Generate V1 V2) | |
set(V ${V1}${V2}) | |
ADD_CUSTOM_COMMAND( | |
OUTPUT gl_core${V}.h gl_core${V}.c | |
COMMAND $ENV{LUA_DEV}/lua.exe "$ENV{_PROJECT_ROOT_}/LoadGen.lua" -profile=core -style=pointer_c -spec=gl -version=${V1}.${V2} core${V} | |
) | |
add_library(glcore${V} gl_core${V}.c) | |
install(TARGETS glcore${V} ARCHIVE DESTINATION lib) | |
install( | |
FILES ${CMAKE_CURRENT_BINARY_DIR}/gl_core${V}.h | |
DESTINATION include/gl | |
RENAME core${V}.h) | |
endmacro(Generate) | |
foreach(N 0 1 2 3) | |
Generate(3 ${N}) | |
endforeach(N) | |
foreach(N 0 1 2 3 4) | |
Generate(4 ${N}) | |
endforeach(N) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment