Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6571247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:51:28+00:00 2026-05-25T14:51:28+00:00

I have a project where the source files are in source/ and some shader

  • 0

I have a project where the source files are in source/ and some shader files in data/ (those are not compiled, but instead loaded by the code). I’d like these files to show up in my CMake-generated VS2010 project files so I can edit them comfortably. What’s a good way to do this? Ideally, they’d be in a separate project, but anything that works is good.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:51:28+00:00Added an answer on May 25, 2026 at 2:51 pm

    I can’t comment (reputation too low) but is this what you want ?
    http://www.cmake.org/pipermail/cmake/2006-May/009291.html

    EDIT: if the above link stops working at some time, the idea is to add the files to Visual Studio like an ordinary source file. Since the IDE has no compile tool associated with it, it will be ignored. Quoting the list’s discussion:

    You could add arbitrary files to a target – as long as VS has no
    “automatic” rule to compile them (e.g. .cc, .cpp etc)
    I am adding .html files to libraries/executable or using a dummy target e.g:

    ADD_EXECUTABLE(dummy dummy.cpp
    “${CMAKE_CURRENT_BINARY_DIR}/Doc/index.html”)

    SOURCE_GROUP command may be useful, too.

    and also

    I think you have to take care that they are added only to VS IDE
    generator builds,
    in particular NOT to makefiles.

    Thus we are using something like this:

    IF    (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
      ADD_EXECUTABLE( hello ${SOURCES} ${HEADER} ${DOC})
    ELSE  (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
      ADD_EXECUTABLE( hello ${SOURCES} )
    ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
    

    Credit to Jan Woetzel

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking through some code on an open source project recently and
I have a grails project with some additional java source files under src/java folder.
I have a Visual C++ 2010 project set up but the source files use
I have a project that includes a shared library as source files. Some of
I have a Java Maven project with about 800 source files (some generated by
Suppose I have a VC++ project containing number of Source (.cpp) files (e.g. 5),
I have a situation where another developer is including source files from a project
I have a table representing values of source file metrics across project revisions, like
I have some local changes to an open source project which uses Subversion as
I had to modify some open source code to use in a C project.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.