author | Tero Marttila <terom@fixme.fi> |
Wed, 21 Jan 2009 23:07:22 +0200 | |
branch | new_graphics |
changeset 412 | 721c60072091 |
parent 411 | 106aaf6eadfe |
child 417 | c503e0c6a740 |
permissions | -rw-r--r-- |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
1 |
FILE(GLOB SOURCE_FILES "*.cc" "Network/*.cc") |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
2 |
FILE(GLOB HEADER_FILES "*.hh" "Network/*.hh") |
0 | 3 |
|
397
13fa0546ef87
hopefully version stuff is now run properly on every make...
Tero Marttila <terom@fixme.fi>
parents:
186
diff
changeset
|
4 |
set_source_files_properties("version.c" PROPERTIES GENERATED true) |
0 | 5 |
|
6 |
# Generate config.h |
|
7 |
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY) |
|
8 |
include_directories("${CMAKE_CURRENT_BINARY_DIR}") |
|
9 |
||
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
10 |
# main module |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
11 |
set (CORE_CLANLIB_COMPONENTS Core App Signals) |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
12 |
set (CORE_SOURCES ${SOURCE_FILES} ${HEADER_FILES}) |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
13 |
|
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
14 |
# Graphics module |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
15 |
add_subdirectory(Graphics) |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
16 |
|
0 | 17 |
# Libraries |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
18 |
set (CLANLIB_VERSION 0.8) |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
19 |
set (CLANLIB_COMPONENTS ${CORE_CLANLIB_COMPONENTS} ${GRAPHICS_CLANLIB_COMPONENTS}) |
0 | 20 |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
119
diff
changeset
|
21 |
# ClanLib 0.8 |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
22 |
message (STATUS "Finding ClanLib version=${CLANLIB_VERSION}, components=${CLANLIB_COMPONENTS}" ) |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
23 |
find_package(ClanLib ${CLANLIB_VERSION} REQUIRED COMPONENTS ${CLANLIB_COMPONENTS}) |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
24 |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
119
diff
changeset
|
25 |
include_directories(${ClanLib_INCLUDE_DIRS}) |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
26 |
|
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
27 |
# build list of libs/source files |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
119
diff
changeset
|
28 |
set(LIBS ${LIBS} ${ClanLib_LIBRARIES}) |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
29 |
set(SOURCES ${CORE_SOURCES} ${GRAPHICS_SOURCES} "version.c") |
0 | 30 |
|
31 |
# Assumes the project generates only one executable. If you need more, you'll need to alter |
|
32 |
# the script and replace ${PROJECT_SHORT_NAME} by executable name. |
|
33 |
add_executable("${PROJECT_SHORT_NAME}" ${SOURCES}) |
|
34 |
target_link_libraries("${PROJECT_SHORT_NAME}" ${LIBS}) |
|
35 |
install(TARGETS "${PROJECT_SHORT_NAME}" DESTINATION bin) |
|
36 |
||
6 | 37 |