Show
Ignore:
Timestamp:
04/06/08 06:15:01 (8 months ago)
Author:
krobillard
Message:

Thune-gl is now built separately with CMake.
Added UG_DT_COUNT & ug_datatypes to thune-gl header.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/gl/CMakeLists.txt

    r517 r518  
    11project(ThuneGL C) 
    2  
    3 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake_modules/") 
    42 
    53# set(CMAKE_BUILD_TYPE Debug) 
     
    75 
    86 
    9 # These package checks are only needed when ../CMakeLists.txt is not used. 
    10 #find_package( FreeType REQUIRED ) 
    11 #find_package( OpenGL REQUIRED ) 
    12 #find_package( OpenAL REQUIRED ) 
    13 #find_package( PNG REQUIRED ) 
    14 #find_package( GLV REQUIRED ) 
     7# Why isn't this the default? 
     8# Having to repeat the conditional expression is retarded. 
     9set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) 
     10 
     11set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake_modules/") 
     12 
     13 
     14find_package( Thune REQUIRED ) 
     15find_package( FreeType REQUIRED ) 
     16find_package( OpenGL REQUIRED ) 
     17find_package( OpenAL REQUIRED ) 
     18find_package( PNG REQUIRED ) 
     19find_package( GLV REQUIRED ) 
    1520 
    1621 
     
    1924    add_definitions(-std=c99) 
    2025#    set(GLV_FILE glv/mac/glv.c) 
    21 endif (APPLE) 
     26endif () 
    2227 
    2328if (UNIX AND NOT APPLE) 
     
    2833#    set(GLV_FILE glv/x11/glv.c) 
    2934    set(JOYSTICK_FILE joystick.c) 
    30 endif (UNIX AND NOT APPLE) 
     35endif () 
    3136 
    3237if (WIN32) 
    3338    include_directories(../win32) 
    3439#    set(GLV_FILE glv/win32/glv.c) 
    35 endif (WIN32) 
     40endif () 
    3641 
    3742 
     
    7075set_target_properties(thuneGL-lib PROPERTIES OUTPUT_NAME "thune-gl") 
    7176 
     77if (APPLE) 
     78    target_link_libraries(thuneGL-lib bz2 m) 
     79endif () 
     80 
     81if (UNIX AND NOT APPLE) 
     82    target_link_libraries(thuneGL-lib 
     83        vorbis vorbisfile alut 
     84        X11 Xxf86vm 
     85        bz2 m pthread 
     86    ) 
     87endif () 
     88 
     89if (WIN32) 
     90    target_link_libraries(thuneGL-lib ws2_32) 
     91endif () 
     92 
    7293link_directories(../) 
    7394target_link_libraries(thuneGL-lib 
    74     thune-lib 
     95    ${THUNE_LIBRARY} 
    7596    ${PNG_LIBRARY} 
    7697    ${FREETYPE_LIBRARY} 
     
    82103 
    83104 
    84 add_executable(thune-gl 
    85     ../console.c 
    86 ) 
    87  
     105add_executable(thune-gl ../console.c) 
    88106target_link_libraries(thune-gl thuneGL-lib) 
    89  
    90  
    91 if (APPLE) 
    92     target_link_libraries(thuneGL-lib bz2 m) 
    93 endif (APPLE) 
    94  
    95 if (UNIX AND NOT APPLE) 
    96     target_link_libraries(thuneGL-lib 
    97         vorbis vorbisfile alut 
    98         X11 Xxf86vm 
    99         bz2 m pthread 
    100     ) 
    101 endif (UNIX AND NOT APPLE) 
    102  
    103 if (WIN32) 
    104     target_link_libraries(thuneGL-lib ws2_32) 
    105 endif (WIN32) 
    106107 
    107108 
     
    110111install(TARGETS thuneGL-lib  DESTINATION /usr/local/lib) 
    111112#install(FILES   urlan.h     DESTINATION /usr/local/include) 
    112 endif (UNIX) 
     113endif () 
    113114 
    114115