src/CMakeLists.txt
author terom
Mon, 22 Dec 2008 02:36:57 +0000
changeset 385 e56af22c04dd
parent 186 0738f2949a2b
child 397 13fa0546ef87
permissions -rw-r--r--
better error reporting of NetworkSocket bind/connect failures
186
0738f2949a2b move src/Network% to src/Network/%
terom
parents: 185
diff changeset
     1
FILE(GLOB SOURCE_FILES "*.cc" "Network/*.cc")
0738f2949a2b move src/Network% to src/Network/%
terom
parents: 185
diff changeset
     2
FILE(GLOB HEADER_FILES "*.hh" "Network/*.hh")
0
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