-
Notifications
You must be signed in to change notification settings - Fork 130
Simplified CMakeLists.txt #24
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
Conversation
* Reusing the project name which avoids redeclaration and typos * Using include directories instead of target include directories for each target * Removed FILE GLOB because it is evil and not recommended by Kitware * Reformatted file
|
Note that this breaks the build for osi-sensor-model-packaging (and all other users of OSI) for a couple of reasons:
Both problems can be remedied by switching the |
pmai
left a comment
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.
Could be merged with the attached changes...
CMakeLists.txt
Outdated
|
|
||
| protobuf_generate_cpp(PROTO_SRCS PROTO_HEADERS ${OSI_PROTO_FILES}) | ||
|
|
||
| include_directories(${PROTOBUF_INCLUDE_DIRS}) |
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.
i.e. if you switch these two include_directories to
target_include_directories(${PROJECT_NAME} PUBLIC ${PROTOBUF_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(${PROJECT_NAME}_pic PUBLIC ${PROTOBUF_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME}_pic PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
or a loop to this effect I think the change could be merged.
|
I don't know which build should be broken because I've tested it with For re-usage and portability reasons outside of this OSS project (here we don't have a higher hierarchy or other targets - only one single CMakeLists.txt), I've changed it to Can't follow why you want to build something with a cleared CMake cache :-/ |
|
Sorry for the confusion, the build I was refering to was https://github.com/OpenSimulationInterface/osi-sensor-model-packaging and other users that include OSI as a submodule, which was the reason for the original CMakeLists.txt structuring. |
|
D'Oh, I missed the now missing library dependencies during review, will fix in new branch. |
for each target