haraldhv
/
aigo
Archived
1
0
Fork 0

Now using cmake

This commit is contained in:
Harald Hvaal 2007-02-23 17:42:21 +00:00
parent 826a2f41f6
commit 9779856e07
2 changed files with 15 additions and 53 deletions

View File

@ -1,21 +1,6 @@
project(EVERYTHING) project(EVERYTHING)
set(dgl_DIR dgl) set(lib_DIR lib)
get_filename_component(dgl_ABSOLUTE ${dgl_DIR} ABSOLUTE) get_filename_component(lib_ABSOLUTE ${lib_DIR} ABSOLUTE)
add_subdirectory(${dgl_ABSOLUTE}) add_subdirectory(${lib_ABSOLUTE})
set(effector_DIR effector)
get_filename_component(effector_ABSOLUTE ${effector_DIR} ABSOLUTE)
add_subdirectory(${effector_ABSOLUTE})
set(prods_DIR prods)
get_filename_component(prods_ABSOLUTE ${prods_DIR} ABSOLUTE)
add_subdirectory(${prods_ABSOLUTE})
#set(editor_DIR editor)
#get_filename_component(editor_ABSOLUTE ${editor_DIR} ABSOLUTE)
#add_subdirectory(${editor_ABSOLUTE})
set(shadertest_DIR shadertest)
get_filename_component(shadertest_ABSOLUTE ${shadertest_DIR} ABSOLUTE)
add_subdirectory(${shadertest_ABSOLUTE})

View File

@ -1,52 +1,29 @@
project(dgl) project(aigo)
set(DGL_SRCS set(AIGO_SRCS
dgl_default_shaders.c camera.cpp
dgl_error.c quickcam.cpp
dgl_fbo.c settings.cpp
dgl_font.c state.cpp
dgl_image.c
dgl_input.c
dgl_math.c
dgl_model_ase.c
dgl_model_binary.c
dgl_model.c
dgl_perspective.c
dgl_shader.c
dgl_skeleton.c
dgl_sound.c
dgl_timer.c
dgl_window.c
) )
#find SDL and its related libraries #find SDL and its related libraries
find_package(SDL REQUIRED) find_package(SDL REQUIRED)
find_package(SDL_image REQUIRED) find_package(SDL_image REQUIRED)
find_package(SDL_mixer REQUIRED) include_directories( ${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} )
include_directories( ${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} ${SDLMIXER_INCLUDE_DIR})
#find OpenGL and GLU #find OpenGL and GLU
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
include_directories( ${OPENGL_INCLUDE_DIR} ) include_directories( ${OPENGL_INCLUDE_DIR} )
#find GLEW #find GLEW
set(CMAKE_MODULE_PATH ..) #set(CMAKE_MODULE_PATH ..)
find_package(GLEW REQUIRED) #find_package(GLEW REQUIRED)
#compile the aigo library
#compile the dgl library add_library(aigo ${AIGO_SRCS})
add_library(dgl ${DGL_SRCS})
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") #SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
# c99 flag not used now, not supported by visual studio # c99 flag not used now, not supported by visual studio
target_link_libraries(dgl ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ) target_link_libraries(aigo ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${OPENGL_LIBRARIES} )
#extra mac weirdness thingy line
if (APPLE)
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dmain=SDL_main ")
target_link_libraries(dgl -lSDLmain)
endif (APPLE)
#compile the test library
add_executable(test main.c)
target_link_libraries(test dgl)