-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake Subproject Changes #204
base: master
Are you sure you want to change the base?
Conversation
Thank you; this looks as if it ought to be quite a help for CMake/PDCursesMod users (of whom there appear to be a fair number). However, I'm not one of them (still using 'traditional' makefiles) and I am in no way able to comment on CMake matters. @jmalak @jwinarske @sherpya @mannyamorim @GitMensch ... this is really your chunk of the code; any thoughts? |
It "looks" good to me too, but I normally don't use cmake so I can't say much to this PR (just fixed one conflict). Should we have at least one of those "as subprojects" build added to Appveyor for testing (not sure how again...)? @jmalak @jwinarske As Bill I'd really appreciate an actual review. |
@GitMensch I can take a look at this in a few weeks. I'm pretty busy right now. This PR requires creating some test cases that don't exist. It's not suitable for merging just yet. |
@jwinarske Could you please elaborate what test cases you are talking about? I am also interested in seeing this PR merged and am willing to help. |
@dmitmel I just worked out a better solution. I may be able to submit PR tomorrow. |
By the way, this PR also needs to change the way compilation settings ( target_include_directories(my_target PUBLIC ${pdcurses_SOURCE_DIR})
target_link_libraries(my_target PRIVATE winmm.lib) # This is just for Windows, obviously |
set(PDCURSES_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) | ||
set(PDCURSES_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, these two variables aren't necessary since CMake already automatically creates <PROJECT>_SOURCE_DIR
and <PROJECT>_BINARY_DIR
, in our case pdcurses_SOURCE_DIR
and pdcurses_BINARY_DIR
(notice the casing).
Hi,
I made some rudimentary changes to the CMake files so that I could include PDCursesMod as a "subproject".
I'm by no means an expert on CMake so I'm hoping I didn't mess anything else up. I'm sure this can be improved as well.
Example that will essentially only build the VT port as a static library: