2 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
5 # include path for our cmake modules
6 set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/etc/cmake")
10 set(exename ${name}-exe)
11 set(libname ${name}-library)
16 "src/ops.statement.cpp"
19 "src/builtin.string.cpp"
20 "src/builtin.table.cpp"
21 "src/builtin.array.cpp"
22 "src/builtin.number.cpp"
33 # so 'aqua.h' can be found
34 include_directories("include")
36 ## you may want to change these params -- they apply to g++.
37 ## clang++ will (oddly enough) yield llvm bitcode when '-flto' is passed,
38 ## and 'ld' won't be able to use the generated object files.
49 # praise cmake for making things easier!
50 add_library(${libname} SHARED ${libsources})
51 set_target_properties(${libname} PROPERTIES OUTPUT_NAME ${name})
53 # get rid of the 'lib' prefix on windows
54 set_target_properties(${libname} PROPERTIES CMAKE_SHARED_LIBRARY_PREFIX "")
55 set_target_properties(${libname} PROPERTIES CMAKE_SHARED_MODULE_PREFIX "")
57 target_link_libraries(${libname})
61 add_executable(${exename} ${binsources})
62 SET_TARGET_PROPERTIES(${exename} PROPERTIES OUTPUT_NAME ${name})
63 target_link_libraries(${exename} ${libname})