summaryrefslogtreecommitdiff
path: root/compiler/loco/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/loco/CMakeLists.txt')
-rw-r--r--compiler/loco/CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/compiler/loco/CMakeLists.txt b/compiler/loco/CMakeLists.txt
new file mode 100644
index 000000000..f94052840
--- /dev/null
+++ b/compiler/loco/CMakeLists.txt
@@ -0,0 +1,28 @@
+file(GLOB_RECURSE SOURCES "src/*.cpp")
+file(GLOB_RECURSE TESTS "src/*.test.cpp")
+list(REMOVE_ITEM SOURCES ${TESTS})
+
+add_library(loco SHARED ${SOURCES})
+target_include_directories(loco PUBLIC include)
+# TODO Remove dependencies on angkor library
+target_link_libraries(loco PUBLIC angkor)
+target_link_libraries(loco PRIVATE stdex)
+# Let's apply nncc common compile options
+#
+# NOTE This will enable strict compilation (warnings as error).
+# Please refer to the top-level CMakeLists.txt for details
+target_link_libraries(loco PRIVATE nncc_common)
+target_link_libraries(loco PUBLIC nncc_coverage)
+# Q. HOW TO MAKE DEV PACKAGE(?)
+install(TARGETS loco DESTINATION lib)
+
+if(NOT ENABLE_TEST)
+ return()
+endif(NOT ENABLE_TEST)
+
+# Google Test is mandatory for internal testing
+nnas_find_package(GTest REQUIRED)
+
+GTest_AddTest(loco_test ${TESTS})
+target_link_libraries(loco_test stdex)
+target_link_libraries(loco_test loco)