author  Harley Laue <losinggeneration@gmail.com> 
Sat, 15 May 2010 12:55:24 0500  
changeset 258  2eb9569dd401 
parent 236  2db41dbd94d3 
child 259  39c93192fc7d 
permissions  rwrr 
103
e58c73e8c0f1
Quickly created CMake to build the source
Harley Laue <losinggeneration@gmail.com>
parents:
diff
changeset

1 
project(lugaru) 
e58c73e8c0f1
Quickly created CMake to build the source
Harley Laue <losinggeneration@gmail.com>
parents:
diff
changeset

2 

e58c73e8c0f1
Quickly created CMake to build the source
Harley Laue <losinggeneration@gmail.com>
parents:
diff
changeset

3 
cmake_minimum_required(VERSION 2.6) 
e58c73e8c0f1
Quickly created CMake to build the source
Harley Laue <losinggeneration@gmail.com>
parents:
diff
changeset

4 

180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

5 
set(SRCDIR "${CMAKE_CURRENT_SOURCE_DIR}/Source") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

6 
set(DEPDIR "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

7 

203
f0d0a6ab22c4
Fixed CMake detection of internal libs
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
199
diff
changeset

8 
if(NOT CMAKE_BUILD_TYPE) 
f0d0a6ab22c4
Fixed CMake detection of internal libs
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
199
diff
changeset

9 
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING 
f0d0a6ab22c4
Fixed CMake detection of internal libs
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
199
diff
changeset

10 
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel" 
f0d0a6ab22c4
Fixed CMake detection of internal libs
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
199
diff
changeset

11 
FORCE) 
108
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

12 
endif(NOT CMAKE_BUILD_TYPE) 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

13 

5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

14 
if(NOT LUGARU_INSTALL_PREFIX) 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

15 
if(WIN32) 
194
9011bad18a44
Fixed error in handling Lugaru's default Windows install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
192
diff
changeset

16 
set(LUGARU_INSTALL_PREFIX "C:/Lugaru" CACHE PATH 
108
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

17 
"LUGARU_INSTALL_PREFIX: Install path prefix, prepended onto install directories." 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

18 
FORCE) 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

19 
else(WIN32) 
194
9011bad18a44
Fixed error in handling Lugaru's default Windows install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
192
diff
changeset

20 
set(LUGARU_INSTALL_PREFIX "/usr/local/lugaru" CACHE PATH 
108
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

21 
"CMAKE_INSTALL_PREFIX: Install path prefix, prepended onto install directories." 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

22 
FORCE) 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

23 
endif(WIN32) 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

24 
endif(NOT LUGARU_INSTALL_PREFIX) 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

25 

180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

26 
set(CMAKE_INSTALL_PREFIX "${LUGARU_INSTALL_PREFIX}" CACHE INTERNAL "Prefix prepended to install directories" FORCE) 
108
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

27 

229
2a456fb60968
Fixed conditional with configuring OpenGL to only activate with MinGW
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
227
diff
changeset

28 
if(MINGW) 
129
068873e48367
Fixed Windows conditionals for building resources and OpenGL library linkage in CMake scripts; Switching to default branch
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
119
diff
changeset

29 
set(OPENGL_gl_LIBRARY "lopengl32" CACHE STRING "OpenGL library for Win32" FORCE) 
068873e48367
Fixed Windows conditionals for building resources and OpenGL library linkage in CMake scripts; Switching to default branch
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
119
diff
changeset

30 
set(OPENGL_glu_LIBRARY "lglu32" CACHE STRING "GLU library for Win32" FORCE) 
229
2a456fb60968
Fixed conditional with configuring OpenGL to only activate with MinGW
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
227
diff
changeset

31 
endif(MINGW) 
108
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

32 

106
e9183cfb697e
Added in support for the CMake module for searching for and configuring to use libvorbisfile and libogg
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
103
diff
changeset

33 
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

34 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

35 
set(LUGARU_SRCS 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

36 
${SRCDIR}/Frustum.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

37 
${SRCDIR}/GameDraw.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

38 
${SRCDIR}/GameInitDispose.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

39 
${SRCDIR}/GameTick.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

40 
${SRCDIR}/Globals.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

41 
${SRCDIR}/Lights.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

42 
${SRCDIR}/Models.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

43 
${SRCDIR}/Objects.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

44 
${SRCDIR}/pack.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

45 
${SRCDIR}/pack_private.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

46 
${SRCDIR}/Person.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

47 
${SRCDIR}/private.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

48 
${SRCDIR}/Quaternions.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

49 
${SRCDIR}/Random.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

50 
${SRCDIR}/Skeleton.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

51 
${SRCDIR}/Skybox.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

52 
${SRCDIR}/Sprites.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

53 
${SRCDIR}/Terrain.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

54 
${SRCDIR}/Text.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

55 
${SRCDIR}/TGALoader.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

56 
${SRCDIR}/unpack.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

57 
${SRCDIR}/unpack_private.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

58 
${SRCDIR}/Weapons.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

59 
${SRCDIR}/OpenGL_Windows.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

60 
${SRCDIR}/openal_wrapper.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

61 
${SRCDIR}/WinInput.cpp 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

62 
) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

63 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

64 
set(LUGARU_H 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

65 
${SRCDIR}/Constants.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

66 
${SRCDIR}/Frustum.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

67 
${SRCDIR}/Game.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

68 
${SRCDIR}/Lights.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

69 
${SRCDIR}/LinkedList.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

70 
${SRCDIR}/Models.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

71 
${SRCDIR}/Objects.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

72 
${SRCDIR}/Person.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

73 
${SRCDIR}/PhysicsMath.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

74 
${SRCDIR}/Pointer.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

75 
${SRCDIR}/Quaternions.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

76 
${SRCDIR}/Random.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

77 
${SRCDIR}/Skeleton.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

78 
${SRCDIR}/Skybox.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

79 
${SRCDIR}/Sprites.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

80 
${SRCDIR}/TGALoader.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

81 
${SRCDIR}/Terrain.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

82 
${SRCDIR}/Text.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

83 
${SRCDIR}/Weapons.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

84 
${SRCDIR}/WinInput.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

85 
${SRCDIR}/alstubs.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

86 
${SRCDIR}/binio.h 
189
8f78a01a216f
Forgot to update CMake... again...
Harley Laue <losinggeneration@gmail.com>
parents:
185
diff
changeset

87 
${SRCDIR}/openal_wrapper.h 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

88 
${SRCDIR}/gamegl.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

89 
${SRCDIR}/glstubs.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

90 
${SRCDIR}/mmgr.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

91 
${SRCDIR}/nommgr.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

92 
${SRCDIR}/pack_private.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

93 
${SRCDIR}/private.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

94 
${SRCDIR}/unpack_private.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

95 
) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

96 

258
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

97 
if(UNIX) 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

98 
set(LUGARU_SRCS 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

99 
${LUGARU_SRCS} 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

100 
${SRCDIR}/MacCompatibility.cpp 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

101 
) 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

102 
set(LUGARU_H 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

103 
${LUGARU_H} 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

104 
${SRCDIR}/MacCompatibility.h 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

105 
) 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

106 
endif(UNIX) 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

107 

2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

108 
if(MSVC) # MSVC nonC99 support biting us hard 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

109 
set(LUGARU_H 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

110 
${LUGARU_H} 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

111 
${DEPDIR}/msinttypes/stdint.h 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

112 
${DEPDIR}/msinttypes/inttypes.h 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

113 
) 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

114 
endif(MSVC) 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

115 

180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

116 
if(WIN32) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

117 
if(CMAKE_CROSSCOMPILING) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

118 
ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

119 
COMMAND i686pcmingw32windres 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

120 
I${SRCDIR}/res 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

121 
o ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

122 
i${SRCDIR}/res/Lugaru.rc 
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

123 
DEPENDS ${SRCDIR}/res/Lugaru.rc 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

124 
) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

125 
endif(CMAKE_CROSSCOMPILING) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

126 
if(NOT CMAKE_CROSSCOMPILING) 
226
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

127 
if(MSVC) 
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

128 
ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj 
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

129 
COMMAND rc 
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

130 
I${SRCDIR}/res 
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

131 
fo${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj 
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

132 
${SRCDIR}/res/Lugaru.rc 
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

133 
DEPENDS ${SRCDIR}/res/Lugaru.rc 
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

134 
) 
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

135 
endif(MSVC) 
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

136 
if(MINGW) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

137 
ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

138 
COMMAND windres 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

139 
I${SRCDIR}/res 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

140 
o ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

141 
i${SRCDIR}/res/Lugaru.rc 
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

142 
DEPENDS ${SRCDIR}/res/Lugaru.rc 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

143 
) 
226
b088d858bd7a
Added in support for resource compilation in MSVC; Windows support is hopefully complete from the buildsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
224
diff
changeset

144 
endif(MINGW) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

145 
endif(NOT CMAKE_CROSSCOMPILING) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

146 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

147 
# !!! FIXME: get rid of this. 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

148 
set(LUGARU_SRCS 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

149 
${LUGARU_SRCS} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

150 
${SRCDIR}/WinDefs.cpp) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

151 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

152 
set(LUGARU_H 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

153 
${LUGARU_H} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

154 
${SRCDIR}/WinDefs.h 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

155 
${SRCDIR}/res/resource.h) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

156 
endif(WIN32) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

157 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

158 
if (APPLE) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

159 
set(PLATFORM_LIBS "framework Carbon framework Cocoa framework OpenGL framework OpenAL") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

160 
endif (APPLE) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

161 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

162 
# Deal with dependencies... 
103
e58c73e8c0f1
Quickly created CMake to build the source
Harley Laue <losinggeneration@gmail.com>
parents:
diff
changeset

163 
find_package(OpenGL REQUIRED) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

164 
# force this include dir no matter what, so we get sane headers. 
258
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

165 
option (LUGARU_FORCE_INTERNAL_OPENGL "Force internal OpenGL headers, even if there's a system version" True) 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

166 
if (LUGARU_FORCE_INTERNAL_OPENGL) 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

167 
include_directories("${DEPDIR}/OpenGL") 
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

168 
endif (LUGARU_FORCE_INTERNAL_OPENGL) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

169 

192
17c5df59e083
Oops, forgot to actually predefine the OpenAL internal library configuration
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
190
diff
changeset

170 
option (LUGARU_FORCE_INTERNAL_OPENAL "Force internal libOpenAL, even if there's a system version" False) 
188
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

171 
if (NOT LUGARU_FORCE_INTERNAL_OPENAL) 
258
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

172 
find_package(OpenAL REQUIRED) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

173 
else(NOT LUGARU_FORCE_INTERNAL_OPENAL) 
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

174 
set(OPENAL_FOUND False) 
188
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

175 
endif (NOT LUGARU_FORCE_INTERNAL_OPENAL) 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

176 

258
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

177 
if (NOT OPENAL_FOUND OR LUGARU_FORCE_INTERNAL_OPENAL) 
188
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

178 
message(STATUS "Using internal copy of OpenAL") 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

179 
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} OpenAL") 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

180 
set(OPENALDIR "${DEPDIR}/OpenAL") 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

181 
set(OPENAL_INCLUDE_DIR "${OPENALDIR}/include/AL") 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

182 
set(OPENAL_LIBRARY "") 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

183 

203
f0d0a6ab22c4
Fixed CMake detection of internal libs
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
199
diff
changeset

184 
if (WIN32) 
188
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

185 
set(LUGARU_HAS_INTERNAL_OPENAL True) 
258
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

186 
if (MSVC80) 
224
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

187 
set(OPENAL_LIBRARY 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

188 
${OPENALDIR}/lib/win32/msvc2005/OpenAL32.lib 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

189 
) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

190 
endif (MSVC80) 
258
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

191 
if (MSVC90) 
224
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

192 
set(OPENAL_LIBRARY 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

193 
${OPENALDIR}/lib/win32/msvc2008/OpenAL32.lib 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

194 
) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

195 
endif (MSVC90) 
188
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

196 
if (MINGW) 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

197 
set(OPENAL_LIBRARY 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

198 
${OPENALDIR}/lib/win32/mingw/libOpenAL32.dll.a 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

199 
) 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

200 
endif (MINGW) 
203
f0d0a6ab22c4
Fixed CMake detection of internal libs
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
199
diff
changeset

201 
endif(WIN32) 
188
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

202 

de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

203 
if (NOT LUGARU_HAS_INTERNAL_OPENAL) 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

204 
message(ERROR "We don't have a prebuilt OpenAL for this platform.") 
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

205 
endif (NOT LUGARU_HAS_INTERNAL_OPENAL) 
258
2eb9569dd401
Don't force GL headers if the user doesn't want that
Harley Laue <losinggeneration@gmail.com>
parents:
236
diff
changeset

206 
endif (NOT OPENAL_FOUND OR LUGARU_FORCE_INTERNAL_OPENAL) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

207 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

208 
option (LUGARU_FORCE_INTERNAL_SDL "Force internal libSDL, even if there's a system version" False) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

209 
if (NOT LUGARU_FORCE_INTERNAL_SDL) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

210 
find_package(SDL) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

211 
else(NOT LUGARU_FORCE_INTERNAL_SDL) 
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

212 
set(SDL_FOUND False) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

213 
endif (NOT LUGARU_FORCE_INTERNAL_SDL) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

214 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

215 
if (NOT SDL_FOUND) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

216 
message(STATUS "Using internal copy of SDL") 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

217 
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} SDL") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

218 
set(SDLDIR "${DEPDIR}/SDL12") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

219 
set(SDL_INCLUDE_DIR "${SDLDIR}/include") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

220 
set(SDL_LIBRARY "") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

221 
if (APPLE) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

222 
set(LUGARU_HAS_INTERNAL_SDL True) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

223 
set(SDL_LIBRARY 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

224 
${SDLDIR}/lib/macosx/libSDL1.2.0.dylib 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

225 
${SDLDIR}/lib/macosx/libSDLmainosx.a 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

226 
) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

227 
endif (APPLE) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

228 

203
f0d0a6ab22c4
Fixed CMake detection of internal libs
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
199
diff
changeset

229 
if (WIN32) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

230 
set(LUGARU_HAS_INTERNAL_SDL True) 
224
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

231 
if (MSVC80) 
205
db67d0bf4548
Reverted internal SDL lib configuration modification, made the problem worse
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
204
diff
changeset

232 
set(SDL_LIBRARY 
224
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

233 
${SDLDIR}/lib/win32/msvc2005/SDLmain.lib 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

234 
${SDLDIR}/lib/win32/msvc2005/SDL.lib 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

235 
) 
224
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

236 
endif (MSVC80) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

237 
if (MSVC90) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

238 
set(SDL_LIBRARY 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

239 
${SDLDIR}/lib/win32/msvc2008/SDLmain.lib 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

240 
${SDLDIR}/lib/win32/msvc2008/SDL.lib 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

241 
) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

242 
endif (MSVC90) 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

243 
if (MINGW) 
205
db67d0bf4548
Reverted internal SDL lib configuration modification, made the problem worse
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
204
diff
changeset

244 
set(SDL_LIBRARY 
207
89228e8fc307
Fixed SDL linkage and internal libjpeg linkage breaks
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
205
diff
changeset

245 
"mingw32" 
204
e257a4a37aad
Modified internal SDL lib configuration to properly set up; Added #undef/#define to 'openal_wrapper.h' to fix building on Windows
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
203
diff
changeset

246 
${SDLDIR}/lib/win32/mingw/libSDLmain.a 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

247 
${SDLDIR}/lib/win32/mingw/libSDL.dll.a 
207
89228e8fc307
Fixed SDL linkage and internal libjpeg linkage breaks
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
205
diff
changeset

248 
"mwindows" 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

249 
) 
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

250 
endif (MINGW) 
203
f0d0a6ab22c4
Fixed CMake detection of internal libs
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
199
diff
changeset

251 
endif (WIN32) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

252 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

253 
if (NOT LUGARU_HAS_INTERNAL_SDL) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

254 
message(ERROR "We don't have a prebuilt SDL for this platform.") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

255 
endif (NOT LUGARU_HAS_INTERNAL_SDL) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

256 
endif (NOT SDL_FOUND) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

257 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

258 
option (LUGARU_FORCE_INTERNAL_PNG "Force internal libPNG, even if there's a system version" False) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

259 
if (NOT LUGARU_FORCE_INTERNAL_PNG) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

260 
find_package(PNG) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

261 
else(NOT LUGARU_FORCE_INTERNAL_PNG) 
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

262 
set(PNG_FOUND False) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

263 
endif (NOT LUGARU_FORCE_INTERNAL_PNG) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

264 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

265 
if (NOT PNG_FOUND) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

266 
message(STATUS "Using internal copy of libpng") 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

267 
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} PNG") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

268 
set(PNGDIR "${DEPDIR}/libpng") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

269 
set(PNG_INCLUDE_DIR "${PNGDIR}") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

270 
set(PNG_LIBRARY "") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

271 
set(LUGARU_SRCS 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

272 
${LUGARU_SRCS} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

273 
${PNGDIR}/png.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

274 
${PNGDIR}/pngerror.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

275 
${PNGDIR}/pngget.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

276 
${PNGDIR}/pngmem.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

277 
${PNGDIR}/pngpread.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

278 
${PNGDIR}/pngread.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

279 
${PNGDIR}/pngrio.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

280 
${PNGDIR}/pngrtran.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

281 
${PNGDIR}/pngrutil.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

282 
${PNGDIR}/pngset.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

283 
${PNGDIR}/pngtrans.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

284 
${PNGDIR}/pngwio.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

285 
${PNGDIR}/pngwrite.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

286 
${PNGDIR}/pngwtran.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

287 
${PNGDIR}/pngwutil.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

288 
) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

289 
endif (NOT PNG_FOUND) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

290 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

291 
option (LUGARU_FORCE_INTERNAL_JPEG "Force internal libJPEG, even if there's a system version" False) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

292 
if (NOT LUGARU_FORCE_INTERNAL_JPEG) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

293 
find_package(JPEG) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

294 
else(NOT LUGARU_FORCE_INTERNAL_JPEG) 
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

295 
set(JPEG_FOUND False) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

296 
endif (NOT LUGARU_FORCE_INTERNAL_JPEG) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

297 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

298 
if (NOT JPEG_FOUND) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

299 
message(STATUS "Using internal copy of libjpeg") 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

300 
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} JPEG") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

301 
set(JPEGDIR "${DEPDIR}/libjpeg") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

302 
set(JPEG_INCLUDE_DIR "${JPEGDIR}") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

303 
set(JPEG_LIBRARY "") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

304 
set(LUGARU_SRCS 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

305 
${LUGARU_SRCS} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

306 
${JPEGDIR}/jdapistd.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

307 
${JPEGDIR}/jdmaster.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

308 
${JPEGDIR}/jdapimin.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

309 
${JPEGDIR}/jcapimin.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

310 
${JPEGDIR}/jdmerge.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

311 
${JPEGDIR}/jdatasrc.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

312 
${JPEGDIR}/jdatadst.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

313 
${JPEGDIR}/jdcoefct.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

314 
${JPEGDIR}/jdcolor.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

315 
${JPEGDIR}/jddctmgr.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

316 
${JPEGDIR}/jdhuff.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

317 
${JPEGDIR}/jdinput.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

318 
${JPEGDIR}/jdmainct.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

319 
${JPEGDIR}/jdmarker.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

320 
${JPEGDIR}/jdpostct.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

321 
${JPEGDIR}/jdsample.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

322 
${JPEGDIR}/jdtrans.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

323 
${JPEGDIR}/jerror.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

324 
${JPEGDIR}/jidctflt.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

325 
${JPEGDIR}/jidctfst.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

326 
${JPEGDIR}/jidctint.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

327 
${JPEGDIR}/jmemmgr.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

328 
${JPEGDIR}/jutils.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

329 
${JPEGDIR}/jmemnobs.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

330 
${JPEGDIR}/jquant1.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

331 
${JPEGDIR}/jquant2.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

332 
${JPEGDIR}/jcomapi.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

333 
${JPEGDIR}/jcmarker.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

334 
${JPEGDIR}/jcapistd.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

335 
${JPEGDIR}/jcparam.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

336 
${JPEGDIR}/jcinit.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

337 
${JPEGDIR}/jcdctmgr.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

338 
${JPEGDIR}/jccoefct.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

339 
${JPEGDIR}/jcmainct.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

340 
${JPEGDIR}/jfdctflt.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

341 
${JPEGDIR}/jfdctint.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

342 
${JPEGDIR}/jfdctfst.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

343 
${JPEGDIR}/jchuff.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

344 
${JPEGDIR}/jcsample.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

345 
${JPEGDIR}/jcmaster.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

346 
${JPEGDIR}/jccolor.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

347 
${JPEGDIR}/jcprepct.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

348 
${JPEGDIR}/jcarith.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

349 
${JPEGDIR}/jdarith.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

350 
${JPEGDIR}/jaricom.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

351 
) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

352 
endif (NOT JPEG_FOUND) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

353 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

354 
option (LUGARU_FORCE_INTERNAL_ZLIB "Force internal zlib, even if there's a system version" False) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

355 
if (NOT LUGARU_FORCE_INTERNAL_ZLIB) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

356 
find_package(ZLIB) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

357 
else(NOT LUGARU_FORCE_INTERNAL_ZLIB) 
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

358 
set(ZLIB_FOUND False) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

359 
endif (NOT LUGARU_FORCE_INTERNAL_ZLIB) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

360 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

361 
if (NOT ZLIB_FOUND) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

362 
message(STATUS "Using internal copy of zlib") 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

363 
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} ZLIB") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

364 
set(ZLIBDIR "${DEPDIR}/zlib") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

365 
set(ZLIB_INCLUDE_DIR "${ZLIBDIR}") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

366 
set(ZLIB_LIBRARIES "") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

367 
set(LUGARU_SRCS 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

368 
${LUGARU_SRCS} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

369 
${ZLIBDIR}/adler32.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

370 
${ZLIBDIR}/compress.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

371 
${ZLIBDIR}/crc32.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

372 
${ZLIBDIR}/deflate.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

373 
${ZLIBDIR}/infback.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

374 
${ZLIBDIR}/inffast.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

375 
${ZLIBDIR}/inflate.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

376 
${ZLIBDIR}/inftrees.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

377 
${ZLIBDIR}/trees.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

378 
${ZLIBDIR}/uncompr.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

379 
${ZLIBDIR}/zutil.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

380 
) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

381 
endif (NOT ZLIB_FOUND) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

382 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

383 
option (LUGARU_FORCE_INTERNAL_GLU "Force internal libGLU, even if there's a system version" False) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

384 
if (LUGARU_FORCE_INTERNAL_GLU) 
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

385 
set(OPENGL_GLU_FOUND False) 
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

386 
endif (LUGARU_FORCE_INTERNAL_GLU) 
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

387 

f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

388 
if (NOT OPENGL_GLU_FOUND) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

389 
message(STATUS "Using internal copy of libGLU") 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

390 
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} GLU") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

391 
set(GLUDIR "${DEPDIR}/GLU") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

392 
set(GLU_INCLUDE_DIR "${GLUDIR}") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

393 
set(GLU_LIBRARY "") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

394 
set(LUGARU_SRCS 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

395 
${LUGARU_SRCS} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

396 
${GLUDIR}/dict.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

397 
${GLUDIR}/geom.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

398 
${GLUDIR}/memalloc.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

399 
${GLUDIR}/mesh.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

400 
${GLUDIR}/mipmap.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

401 
${GLUDIR}/normal.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

402 
${GLUDIR}/priorityq.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

403 
${GLUDIR}/render.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

404 
${GLUDIR}/sweep.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

405 
${GLUDIR}/tess.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

406 
${GLUDIR}/tessmono.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

407 
${GLUDIR}/util.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

408 
) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

409 
endif (NOT OPENGL_GLU_FOUND) 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

410 

182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

411 
option (LUGARU_FORCE_INTERNAL_VORBIS "Force internal Vorbis, even if there's a system version" False) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

412 
if (NOT LUGARU_FORCE_INTERNAL_VORBIS) 
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

413 
find_package(OggVorbis) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

414 
else(NOT LUGARU_FORCE_INTERNAL_VORBIS) 
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

415 
set(OGGVORBIS_FOUND False) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

416 
endif (NOT LUGARU_FORCE_INTERNAL_VORBIS) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

417 

f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

418 
if (NOT OGGVORBIS_FOUND) 
182
20ef226ace70
Fixed dependencies, made them optional (so you can override system libs).
Ryan C. Gordon <icculus@icculus.org>
parents:
180
diff
changeset

419 
message(STATUS "Using internal copy of Ogg Vorbis") 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

420 
set(LUGARU_MISSING_DEPS "${LUGARU_MISSING_DEPS} OggVorbis") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

421 
set(OGGDIR "${DEPDIR}/libogg") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

422 
set(OGG_INCLUDE_DIR "${OGGDIR}/include") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

423 
set(OGG_LIBRARY "") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

424 
set(VORBISDIR "${DEPDIR}/libvorbis") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

425 
set(VORBISFILE_INCLUDE_DIR "${VORBISDIR}/include") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

426 
set(VORBISFILE_LIBRARY "") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

427 
set(LUGARU_SRCS 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

428 
${LUGARU_SRCS} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

429 
${OGGDIR}/src/bitwise.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

430 
${OGGDIR}/src/framing.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

431 
${VORBISDIR}/lib/analysis.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

432 
${VORBISDIR}/lib/bitrate.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

433 
${VORBISDIR}/lib/block.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

434 
${VORBISDIR}/lib/codebook.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

435 
${VORBISDIR}/lib/envelope.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

436 
${VORBISDIR}/lib/floor0.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

437 
${VORBISDIR}/lib/floor1.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

438 
${VORBISDIR}/lib/info.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

439 
${VORBISDIR}/lib/lpc.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

440 
${VORBISDIR}/lib/lsp.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

441 
${VORBISDIR}/lib/mapping0.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

442 
${VORBISDIR}/lib/mdct.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

443 
${VORBISDIR}/lib/psy.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

444 
${VORBISDIR}/lib/registry.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

445 
${VORBISDIR}/lib/res0.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

446 
${VORBISDIR}/lib/sharedbook.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

447 
${VORBISDIR}/lib/smallft.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

448 
${VORBISDIR}/lib/synthesis.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

449 
${VORBISDIR}/lib/vorbisfile.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

450 
${VORBISDIR}/lib/window.c 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

451 
) 
197
f88b3d83e992
Fixed CMake so Force internal actually has a chance at working correctly
Harley Laue <losinggeneration@gmail.com>
parents:
190
diff
changeset

452 
endif (NOT OGGVORBIS_FOUND) 
103
e58c73e8c0f1
Quickly created CMake to build the source
Harley Laue <losinggeneration@gmail.com>
parents:
diff
changeset

453 

e58c73e8c0f1
Quickly created CMake to build the source
Harley Laue <losinggeneration@gmail.com>
parents:
diff
changeset

454 
include_directories( 
180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

455 
${OPENAL_INCLUDE_DIR} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

456 
${JPEG_INCLUDE_DIR} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

457 
${PNG_INCLUDE_DIR} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

458 
${ZLIB_INCLUDE_DIR} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

459 
${OPENGL_INCLUDE_DIR} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

460 
${GLU_INCLUDE_DIR} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

461 
${SDL_INCLUDE_DIR} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

462 
${VORBISFILE_INCLUDE_DIR} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

463 
${OGG_INCLUDE_DIR} 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

464 
${CMAKE_SOURCE_DIR}/Source 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

465 
) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

466 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

467 
set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${GLU_LIBRARY} ${OPENGL_LIBRARY} ${VORBISFILE_LIBRARY} ${OGG_LIBRARY} ${PLATFORM_LIBS}) 
103
e58c73e8c0f1
Quickly created CMake to build the source
Harley Laue <losinggeneration@gmail.com>
parents:
diff
changeset

468 

180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

469 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

470 
if(WIN32) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

471 
add_executable(lugaru ${LUGARU_SRCS} ${LUGARU_H} lugaru_resource.obj) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

472 
else(WIN32) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

473 
add_executable(lugaru ${LUGARU_SRCS} ${LUGARU_H}) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

474 
endif(WIN32) 
103
e58c73e8c0f1
Quickly created CMake to build the source
Harley Laue <losinggeneration@gmail.com>
parents:
diff
changeset

475 

180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

476 
target_link_libraries(lugaru ${LUGARU_LIBS}) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

477 

c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

478 
if(WIN32) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

479 
add_definitions(DUSE_OPENAL=1 DUSE_SDL=1 DBinIO_STDINT_HEADER=<stdint.h>) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

480 
else(WIN32) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

481 
add_definitions(DPLATFORM_LINUX=1 DPLATFORM_UNIX=1 DUSE_OPENAL=1 DUSE_SDL=1 DBinIO_STDINT_HEADER=<stdint.h>) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

482 
endif(WIN32) 
108
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

483 

5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

484 
# Install target 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

485 
if(WIN32) 
198
8558423199a2
Fixed install paths in CMake so that the compiled binary is properly installed
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
194
diff
changeset

486 
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lugaru.exe DESTINATION ${CMAKE_INSTALL_PREFIX}) 
224
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

487 
if(MSVC80) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

488 
install(FILES ${SDLDIR}/lib/win32/msvc2005/SDL.dll DESTINATION ${CMAKE_INSTALL_PREFIX}) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

489 
install(FILES ${OPENALDIR}/lib/win32/msvc2005/OpenAL32.dll DESTINATION ${CMAKE_INSTALL_PREFIX}) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

490 
endif(MSVC80) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

491 
if(MSVC90) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

492 
install(FILES ${SDLDIR}/lib/win32/msvc2008/SDL.dll DESTINATION ${CMAKE_INSTALL_PREFIX}) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

493 
install(FILES ${OPENALDIR}/lib/win32/msvc2008/OpenAL32.dll DESTINATION ${CMAKE_INSTALL_PREFIX}) 
1032a9cd8de0
Added in support for MSVC building for MSVC2005 and MSVC2008; Windows support is hopefully complete from the builsystem.
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
218
diff
changeset

494 
endif(MSVC90) 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

495 
if(MINGW) 
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

496 
install(FILES ${SDLDIR}/lib/win32/mingw/SDL.dll DESTINATION ${CMAKE_INSTALL_PREFIX}) 
188
de6bc7071b0c
Added internal OpenAL libs for MinGW on Windows; MSVC internal libs to come soon
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
185
diff
changeset

497 
install(FILES ${OPENALDIR}/lib/win32/mingw/OpenAL32.dll DESTINATION ${CMAKE_INSTALL_PREFIX}) 
185
426ac9b86fcd
Added win32 SDL libraries for MinGW and MSVC; Modified CMake scripts to properly install 'SDL.dll' to install prefix
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
182
diff
changeset

498 
endif(MINGW) 
108
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

499 
else(WIN32) 
198
8558423199a2
Fixed install paths in CMake so that the compiled binary is properly installed
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
194
diff
changeset

500 
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lugaru DESTINATION ${CMAKE_INSTALL_PREFIX}) 
108
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

501 
endif(WIN32) 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

502 

5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

503 
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${CMAKE_INSTALL_PREFIX}) 
5c75adc4301e
Added support for 'make install' target in CMake scripts
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
parents:
106
diff
changeset

504 

180
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

505 
if (LUGARU_MISSING_DEPS) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

506 
message(STATUS "Using our copy of these libs: ${LUGARU_MISSING_DEPS}") 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

507 
endif (LUGARU_MISSING_DEPS) 
c2da3c58262a
Reworked CMakeLists.txt.
Ryan C. Gordon <icculus@icculus.org>
parents:
169
diff
changeset

508 