CMakeLists.txt
branchtrunk
changeset 415 25ca83d8bbd5
parent 406 682e9073a9cf
child 423 ee393c1cf3b4
equal deleted inserted replaced
414:fdb12120213e 415:25ca83d8bbd5
    11 IF(MSVC)
    11 IF(MSVC)
    12     ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS=1)
    12     ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS=1)
    13     ADD_DEFINITIONS(-TP)  # force .c files to compile as C++.
    13     ADD_DEFINITIONS(-TP)  # force .c files to compile as C++.
    14 ENDIF(MSVC)
    14 ENDIF(MSVC)
    15 
    15 
       
    16 ADD_LIBRARY(mojoshader STATIC mojoshader.c mojoshader_opengl.c)
       
    17 
    16 FIND_PACKAGE(SDL)
    18 FIND_PACKAGE(SDL)
    17 IF(SDL_FOUND)
    19 IF(SDL_FOUND)
    18     INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
    20     INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
    19     ADD_DEFINITIONS(-DFINDERRORS_COMPILE_SHADERS=1)
    21     ADD_DEFINITIONS(-DFINDERRORS_COMPILE_SHADERS=1)
    20     ADD_EXECUTABLE(glcaps glcaps.c)
    22     ADD_EXECUTABLE(glcaps glcaps.c)
    21     TARGET_LINK_LIBRARIES(glcaps ${SDL_LIBRARY})
    23     TARGET_LINK_LIBRARIES(glcaps ${SDL_LIBRARY})
    22     ADD_EXECUTABLE(bestprofile bestprofile.c mojoshader.c mojoshader_opengl.c)
    24     ADD_EXECUTABLE(bestprofile bestprofile.c)
    23     TARGET_LINK_LIBRARIES(bestprofile ${SDL_LIBRARY})
    25     TARGET_LINK_LIBRARIES(bestprofile mojoshader ${SDL_LIBRARY})
    24 ENDIF(SDL_FOUND)
    26 ENDIF(SDL_FOUND)
    25 
    27 
    26 ADD_EXECUTABLE(testparse testparse.c mojoshader.c)
    28 ADD_EXECUTABLE(testparse testparse.c)
    27 ADD_EXECUTABLE(testoutput testoutput.c mojoshader.c)
    29 TARGET_LINK_LIBRARIES(testparse mojoshader)
    28 ADD_EXECUTABLE(finderrors finderrors.c mojoshader.c mojoshader_opengl.c)
    30 ADD_EXECUTABLE(testoutput testoutput.c)
    29 TARGET_LINK_LIBRARIES(finderrors ${SDL_LIBRARY} ${EXTRA_LIBS})
    31 TARGET_LINK_LIBRARIES(testoutput mojoshader)
       
    32 ADD_EXECUTABLE(finderrors finderrors.c)
       
    33 TARGET_LINK_LIBRARIES(finderrors mojoshader ${SDL_LIBRARY})
    30 
    34 
    31 # End of CMakeLists.txt ...
    35 # End of CMakeLists.txt ...
    32 
    36