2019-07-26 09:02:47 +00:00
|
|
|
cmake_minimum_required (VERSION 3.0)
|
2019-07-30 13:27:10 +00:00
|
|
|
project (Lagom)
|
2019-07-25 09:56:08 +00:00
|
|
|
|
2019-08-03 18:56:08 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -Wextra -Werror -std=c++17 -fPIC -g")
|
2019-07-26 09:02:47 +00:00
|
|
|
|
|
|
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconsumed")
|
|
|
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-expansion-to-defined")
|
|
|
|
endif()
|
2019-07-25 09:56:08 +00:00
|
|
|
|
2019-11-19 10:14:26 +00:00
|
|
|
file(GLOB AK_SOURCES "../../AK/*.cpp")
|
|
|
|
file(GLOB LIBCORE_SOURCES "../../Libraries/LibCore/*.cpp")
|
|
|
|
file(GLOB LIBIPC_SOURCES "../../Libraries/LibIPC/*.cpp")
|
2020-03-31 16:58:59 +00:00
|
|
|
file(GLOB LIBLINE_SOURCES "../../Libraries/LibLine/*.cpp")
|
2020-03-23 12:15:32 +00:00
|
|
|
file(GLOB LIBJS_SOURCES "../../Libraries/LibJS/*.cpp")
|
|
|
|
file(GLOB LIBJS_SUBDIR_SOURCES "../../Libraries/LibJS/*/*.cpp")
|
2019-07-25 09:56:08 +00:00
|
|
|
|
2020-03-31 16:58:59 +00:00
|
|
|
set(SOURCES ${AK_SOURCES} ${LIBCORE_SOURCES} ${LIBIPC_SOURCES} ${LIBLINE_SOURCES} ${LIBJS_SOURCES} ${LIBJS_SUBDIR_SOURCES})
|
2019-07-25 09:56:08 +00:00
|
|
|
|
2019-11-19 10:14:26 +00:00
|
|
|
include_directories (../../)
|
|
|
|
include_directories (../../Libraries/)
|
2019-07-25 11:16:59 +00:00
|
|
|
add_library(lagom ${SOURCES})
|
2019-07-25 09:56:08 +00:00
|
|
|
|
2019-07-25 11:50:39 +00:00
|
|
|
add_executable(TestApp TestApp.cpp)
|
|
|
|
target_link_libraries(TestApp lagom)
|
|
|
|
target_link_libraries(TestApp stdc++)
|
2020-02-06 18:32:34 +00:00
|
|
|
|
|
|
|
add_executable(TestJson TestJson.cpp)
|
|
|
|
target_link_libraries(TestJson lagom)
|
|
|
|
target_link_libraries(TestJson stdc++)
|
2020-03-23 12:15:32 +00:00
|
|
|
|
|
|
|
add_executable(js ../../Userland/js.cpp)
|
|
|
|
target_link_libraries(js lagom)
|
|
|
|
target_link_libraries(js stdc++)
|
|
|
|
target_link_libraries(js pthread)
|