Created
January 3, 2016 10:40
-
-
Save float1251/b82ad7f9c39273248450 to your computer and use it in GitHub Desktop.
subdirectoryを使用する際のCMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8) | |
project(hello) | |
include_directories("${PROJECT_SOURCE_DIR}") | |
message(----------------------) | |
message(${PROJECT_SOURCE_DIR}) | |
message(----------------------) | |
# file(GLOB subdirs | |
# "${CMAKE_SOURCE_DIR}/src" | |
# "${CMAKE_SOURCE_DIR}/src/*" | |
# ) | |
# | |
# foreach(dir ${subdirs}) | |
# message(${dir}) | |
# endforeach(dir) | |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) | |
file(GLOB_RECURSE SRCS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) | |
foreach(f ${SRCS}) | |
message(${f}) | |
endforeach(f) | |
add_executable(hello test.cpp ${SRCS}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment