diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e5b93b4..97a8fbf7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,3 +11,7 @@ if(PSEMEK_BUILD_TYPE STREQUAL "DEBUG") endif() add_subdirectory(libs) + +add_library(psemek todo.md) +target_link_libraries(psemek INTERFACE ${PSEMEK_LIBRARIES}) +set_target_properties(psemek PROPERTIES LINKER_LANGUAGE CXX) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index f7040cc0..66b726d5 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -1,5 +1,14 @@ -add_subdirectory(util) -add_subdirectory(geom) -add_subdirectory(cg) -add_subdirectory(pcg) -add_subdirectory(gfx) +set(PSEMEK_LIBRARIES + util + geom + cg + pcg + gfx +) + +file(GLOB PSEMEK_LIBRARIES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*") +list(REMOVE_ITEM PSEMEK_LIBRARIES "CMakeLists.txt") + +foreach(lib ${PSEMEK_LIBRARIES}) + add_subdirectory(${lib}) +endforeach()