[Lemon-commits] Alpar Juttner: Move sources to src/
Lemon HG
hg at lemon.cs.elte.hu
Sun Nov 6 21:57:07 CET 2011
details: http://lemon.cs.elte.hu/hg/lemon-project-template/rev/c941f748eaa8
changeset: 7:c941f748eaa8
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Tue Mar 22 20:09:43 2011 +0100
description:
Move sources to src/
diffstat:
CMakeLists.txt | 19 +------------------
src/CMakeLists.txt | 29 +++++++++++++++++++++++++++++
main.cc | 0
3 files changed, 30 insertions(+), 18 deletions(-)
diffs (66 lines):
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,24 +61,7 @@
${LEMON_INCLUDE_DIRS}
)
-## Here we define an executable target. Its name is 'lemon-project' and
-## is compiled from 'main.cc'. You can add more source files separated
-## with whitespaces (including newlines). If you want to build more
-## executables, simple repeat (and edit) the following ADD_EXECUTABLE and
-## TARGET_LINK_LIBRARIES statements.
-
-ADD_EXECUTABLE(lemon-project main.cc)
-TARGET_LINK_LIBRARIES(lemon-project ${LEMON_LIBRARIES})
-
-## This tells cmake to install 'lemon-project' to $PREFIX/bin when
-## 'make install' is executed. You can give more targets separated
-## by whitespaces.
-
-INSTALL(
- TARGETS lemon-project
- RUNTIME DESTINATION bin
- COMPONENT bin
-)
+ADD_SUBDIRECTORY(src)
## Sometimes MSVC overwhelms you with compiler warnings which are impossible to
## avoid. Then comment out these sections. Normally you won't need it as the
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,29 @@
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_BINARY_DIR}/src
+)
+
+## Here we define an executable target. Its name is 'lemon-project' and
+## is compiled from 'main.cc'. You can add more source files separated
+## with whitespaces (including newlines). If you want to build more
+## executables, simple repeat (and edit) the following ADD_EXECUTABLE and
+## TARGET_LINK_LIBRARIES statements.
+
+ADD_EXECUTABLE(lemon-project
+ main.cc
+)
+
+## This tells cmake to install 'lemon-project' to $PREFIX/bin when
+## 'make install' is executed. You can give more targets separated
+## by whitespaces.
+
+TARGET_LINK_LIBRARIES(lemon-project
+ ${LEMON_LIBRARIES}
+)
+
+INSTALL(
+ TARGETS lemon-project
+ RUNTIME DESTINATION bin
+ COMPONENT bin
+)
diff --git a/main.cc b/src/main.cc
rename from main.cc
rename to src/main.cc
More information about the Lemon-commits
mailing list