project_files/frontlib/CMakeLists.txt
author koda
Mon, 17 Jun 2013 17:40:01 +0200
changeset 9234 2bf3796c5855
parent 8084 e723e95c11f1
child 8100 0e6fadf81a2c
permissions -rw-r--r--
This commit changes many aspect of our cmake build system - shared libraries are compiled by default: * this modifies RPATH of unix executables; * this will prevent a lot of linking issues, esp. from pascal world; * the old behaviour (static libs) is still available with -DBUILD_SHARED_LIBS=off; * of course in this case you have to provide the full list of dependencies with FPFLAGS and CMAKE_C_FLAGS; - pascal is now fully integrated with cmake, meaning you can just do add_sources and use CMAKE_Pascal_FLAGS: * some of the language features are only partially implemented, for example .inc files will not get rebuilt if you modify them; * target_link_libraries for pascal targets is just dummy as linking is determined within pascal files; * universal builds for osx are not available any more; - bundled libraries and system libraries are addressed using the target name: * this avoids depedency tracking; * this allows to name output as we wish.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8081
5a7ff368cf01 frontlib paths
koda
parents: 8079
diff changeset
     1
find_package(SDL REQUIRED)
8079
unc0rr
parents:
diff changeset
     2
find_package(SDL_net REQUIRED)
8084
e723e95c11f1 Some fixes to build process
unc0rr
parents: 8081
diff changeset
     3
find_package(ZLIB REQUIRED)
8079
unc0rr
parents:
diff changeset
     4
8081
5a7ff368cf01 frontlib paths
koda
parents: 8079
diff changeset
     5
add_definitions("-std=c99")
8079
unc0rr
parents:
diff changeset
     6
unc0rr
parents:
diff changeset
     7
file(GLOB frontlib_src
unc0rr
parents:
diff changeset
     8
        *.c *.h
unc0rr
parents:
diff changeset
     9
        base64/*.c base64/*.h
unc0rr
parents:
diff changeset
    10
        ipc/*.c ipc/*.h
unc0rr
parents:
diff changeset
    11
        md5/*.c md5/*.h
unc0rr
parents:
diff changeset
    12
        model/*.c model/*.h
unc0rr
parents:
diff changeset
    13
        net/*.c net/*.h
unc0rr
parents:
diff changeset
    14
        util/*.c util/*.h
unc0rr
parents:
diff changeset
    15
    )
unc0rr
parents:
diff changeset
    16
8081
5a7ff368cf01 frontlib paths
koda
parents: 8079
diff changeset
    17
include_directories(${SDL_INCLUDE_DIR})
8079
unc0rr
parents:
diff changeset
    18
include_directories(${SDLNET_INCLUDE_DIR})
8084
e723e95c11f1 Some fixes to build process
unc0rr
parents: 8081
diff changeset
    19
include_directories(${ZLIB_INCLUDE_DIR})
8079
unc0rr
parents:
diff changeset
    20
unc0rr
parents:
diff changeset
    21
add_library(frontlib STATIC ${frontlib_src})