# HG changeset patch # User Ryan C. Gordon # Date 1214719568 14400 # Node ID 25ca83d8bbd5ad57756fa55a7c3bdc7bc981adf7 # Parent fdb12120213e57f8e49b19cb59bb9c51742daeb7 Build mojoshader.c and mojoshader_opengl.c into a static library. No sense in compiling them for each test app. diff -r fdb12120213e -r 25ca83d8bbd5 .hgignore --- a/.hgignore Sun Jun 29 02:00:46 2008 -0400 +++ b/.hgignore Sun Jun 29 02:06:08 2008 -0400 @@ -9,5 +9,7 @@ finderrors glcaps *.exe +*.lib +*.a ps_?_? vs_?_? diff -r fdb12120213e -r 25ca83d8bbd5 CMakeLists.txt --- a/CMakeLists.txt Sun Jun 29 02:00:46 2008 -0400 +++ b/CMakeLists.txt Sun Jun 29 02:06:08 2008 -0400 @@ -13,20 +13,24 @@ ADD_DEFINITIONS(-TP) # force .c files to compile as C++. ENDIF(MSVC) +ADD_LIBRARY(mojoshader STATIC mojoshader.c mojoshader_opengl.c) + FIND_PACKAGE(SDL) IF(SDL_FOUND) INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR}) ADD_DEFINITIONS(-DFINDERRORS_COMPILE_SHADERS=1) ADD_EXECUTABLE(glcaps glcaps.c) TARGET_LINK_LIBRARIES(glcaps ${SDL_LIBRARY}) - ADD_EXECUTABLE(bestprofile bestprofile.c mojoshader.c mojoshader_opengl.c) - TARGET_LINK_LIBRARIES(bestprofile ${SDL_LIBRARY}) + ADD_EXECUTABLE(bestprofile bestprofile.c) + TARGET_LINK_LIBRARIES(bestprofile mojoshader ${SDL_LIBRARY}) ENDIF(SDL_FOUND) -ADD_EXECUTABLE(testparse testparse.c mojoshader.c) -ADD_EXECUTABLE(testoutput testoutput.c mojoshader.c) -ADD_EXECUTABLE(finderrors finderrors.c mojoshader.c mojoshader_opengl.c) -TARGET_LINK_LIBRARIES(finderrors ${SDL_LIBRARY} ${EXTRA_LIBS}) +ADD_EXECUTABLE(testparse testparse.c) +TARGET_LINK_LIBRARIES(testparse mojoshader) +ADD_EXECUTABLE(testoutput testoutput.c) +TARGET_LINK_LIBRARIES(testoutput mojoshader) +ADD_EXECUTABLE(finderrors finderrors.c) +TARGET_LINK_LIBRARIES(finderrors mojoshader ${SDL_LIBRARY}) # End of CMakeLists.txt ...