Registered Member
|
Hi ,
i am working with cmake for building the project . i have made the directory structure like this. -src --Inlcudes -- header_file1.h -- header_file2.h -- CMakeLists.txt -- Display -- display.c -- CMakeLists.txt -- Idle -- idle.c -- CMakeLists.txt and few more directories following the same structure under the main src directory. my main CMakeLists.txt file is this cmake_minimum_required (VERSION 2. project (src) set ( CMAKE_C_FLAGS "-g -std=c99 -fno-stack-protector" ) find_package(OpenGL REQUIRED) find_package(GLUT REQUIRED) include_directories ("${PROJECT_SOURCE_DIR}/Includes") include_directories ("${PROJECT_SOURCE_DIR}/Display") include_directories ("${PROJECT_SOURCE_DIR}/Idle") include_directories ("${PROJECT_SOURCE_DIR}/Init_Function") include_directories ("${PROJECT_SOURCE_DIR}/Initialization") include_directories ("${PROJECT_SOURCE_DIR}/Keyboard") include_directories ("${PROJECT_SOURCE_DIR}/Reshape") include_directories (${OpenGL_INCLUDE_DIRS}) include_directories (${GLUT_INCLUDE_DIR}) add_subdirectory (Includes) add_subdirectory (Display) add_subdirectory (Idle) add_subdirectory (Init_Function) add_subdirectory (Initialization) add_subdirectory (Keyboard) add_subdirectory (Reshape) add_executable (Solar main.c) link_directories ( ${GLUT_LIBRARY_DIRS} ) link_directories ( ${OpenGL_LIBRARY_DIRS} ) add_definitions ( ${GLUT_DEFINITIONS} ) add_definitions ( ${OpenGL_DEFINITIONS} ) target_link_libraries(Solar display_func idle init_func init_planet keyboard reshape) #target_link_libraries(Solar idle) #target_link_libraries(Solar init_func) #target_link_libraries(Solar init_planet) #target_link_libraries(Solar keyboard) #target_link_libraries(Solar reshape) target_link_libraries(Solar ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ) install (TARGETS Solar RUNTIME DESTINATION bin) install (FILES "${PROJECT_SOURCE_DIR}/Includes/all_headers.h" DESTINATION include) install (FILES "${PROJECT_SOURCE_DIR}/Includes/structures.h" DESTINATION include) install (FILES "${PROJECT_SOURCE_DIR}/Includes/extern_vars.h" DESTINATION include) when i run the command make install i get the following error neelam@neelam-VGN-NR110E:~/Desktop/V3-10103_4263/build$ make install [ 14%] Built target reshape [ 28%] Built target idle [ 42%] Built target init_planet [ 57%] Built target init_func [ 71%] Built target display_func [ 85%] Built target keyboard make[2]: *** No rule to make target `/Idle/idle.c', needed by `Solar'. Stop. make[1]: *** [CMakeFiles/Solar.dir/all] Error 2 make: *** [all] Error 2 Can anybody help me please |
Administrator
|
Could you please post a tarball containing your sources somewhere if possible? Many of these issues are easier to debug when one can work with the actual source code.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]