src/CMakeLists.txt
author terom
Wed, 03 Dec 2008 19:16:32 +0000
changeset 185 25becd2cb026
parent 119 7dceed9a7f93
child 186 0738f2949a2b
permissions -rw-r--r--
that's not a prototype anymore... at least it shouldn't be
0
c8174cf25e06 initial import
hrnt
parents:
diff changeset
     1
FILE(GLOB SOURCE_FILES "*.cc")
c8174cf25e06 initial import
hrnt
parents:
diff changeset
     2
FILE(GLOB HEADER_FILES "*.hh")
c8174cf25e06 initial import
hrnt
parents:
diff changeset
     3
c8174cf25e06 initial import
hrnt
parents:
diff changeset
     4
set(SOURCES ${SOURCE_FILES} ${HEADER_FILES})
c8174cf25e06 initial import
hrnt
parents:
diff changeset
     5
c8174cf25e06 initial import
hrnt
parents:
diff changeset
     6
# Generate config.h
c8174cf25e06 initial import
hrnt
parents:
diff changeset
     7
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
c8174cf25e06 initial import
hrnt
parents:
diff changeset
     8
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
c8174cf25e06 initial import
hrnt
parents:
diff changeset
     9
c8174cf25e06 initial import
hrnt
parents:
diff changeset
    10
# Libraries
c8174cf25e06 initial import
hrnt
parents:
diff changeset
    11
185
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents: 119
diff changeset
    12
# ClanLib 0.8
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents: 119
diff changeset
    13
find_package(ClanLib 0.8 REQUIRED COMPONENTS Core App Signals Display GL Sound Network)
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents: 119
diff changeset
    14
include_directories(${ClanLib_INCLUDE_DIRS})
25becd2cb026 that's not a prototype anymore... at least it shouldn't be
terom
parents: 119
diff changeset
    15
set(LIBS ${LIBS} ${ClanLib_LIBRARIES})
0
c8174cf25e06 initial import
hrnt
parents:
diff changeset
    16
c8174cf25e06 initial import
hrnt
parents:
diff changeset
    17
# Assumes the project generates only one executable. If you need more, you'll need to alter
c8174cf25e06 initial import
hrnt
parents:
diff changeset
    18
# the script and replace ${PROJECT_SHORT_NAME} by executable name.
c8174cf25e06 initial import
hrnt
parents:
diff changeset
    19
add_executable("${PROJECT_SHORT_NAME}" ${SOURCES})
c8174cf25e06 initial import
hrnt
parents:
diff changeset
    20
target_link_libraries("${PROJECT_SHORT_NAME}" ${LIBS})
c8174cf25e06 initial import
hrnt
parents:
diff changeset
    21
install(TARGETS "${PROJECT_SHORT_NAME}" DESTINATION bin)
c8174cf25e06 initial import
hrnt
parents:
diff changeset
    22
6
faa4e777cc6e fiddle with cmake, fix some compile errors
terom
parents: 0
diff changeset
    23