Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Sommersemester 2015
Cpp
Deth Buff Arr
Commits
12789100
Commit
12789100
authored
Oct 04, 2015
by
Jerry
Browse files
made cmakescript working on Windows
parent
e719db25
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
12789100
...
...
@@ -8,13 +8,26 @@ project(gdw_ss15_cpp)
find_package
(
OpenGL
)
include
(
FindPkgConfig
)
PKG_SEARCH_MODULE
(
SDL2 REQUIRED sdl2
)
PKG_SEARCH_MODULE
(
SDL2MIXER REQUIRED SDL2_mixer
)
include_directories
(
${
SDL2_INCLUDE_DIRS
}
${
SDL2_mixer_INCLUDE_DIRS
}
)
if
(
UNIX
)
include
(
FindPkgConfig
)
PKG_SEARCH_MODULE
(
SDL2 REQUIRED sdl2
)
PKG_SEARCH_MODULE
(
SDL2MIXER REQUIRED SDL2_mixer
)
include_directories
(
${
SDL2_INCLUDE_DIRS
}
${
SDL2_mixer_INCLUDE_DIRS
}
)
elseif
(
WIN32
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/sdl2/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/sdl2_mixer/x86_64-w64-mingw32/include/SDL2
)
link_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/sdl2/x86_64-w64-mingw32/lib
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/sdl2_mixer/x86_64-w64-mingw32/lib
)
file
(
COPY
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/sdl2/x86_64-w64-mingw32/bin/SDL2.dll DESTINATION .
)
file
(
COPY
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/sdl2_mixer/x86_64-w64-mingw32/bin/ DESTINATION . FILES_MATCHING PATTERN *.dll
)
endif
()
#gli library
...
...
@@ -151,14 +164,28 @@ set(LINKED_LIBRARIES
DetourCrowd
Detour
Recast
SDL2
SDL2
main
SDL2
main
SDL2
SDL2_mixer
GL
c++
c++abi
)
if
(
UNIX
)
set
(
LINKED_LIBRARIES
${
LINKED_LIBRARIES
}
GL
c++
c++abi
)
elseif
(
WIN32
)
set
(
LINKED_LIBRARIES
imagehlp
mingw32
${
LINKED_LIBRARIES
}
opengl32
-static-libgcc
-static-libstdc++
)
endif
()
#build executable and then link to the libraries
add_executable
(
Game
${
project_SRC
}
${
project_HDR
}
${
project_INL
}
)
target_link_libraries
(
Game
${
LINKED_LIBRARIES
}
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment