Animesh,
> I did exactly as you suggested. My package export cmake configurations. I am
> getting the following error and cant figure out the reason. It is not able to
> link the executable with the package.
>
> CMake Error at CMakeLists.txt:42 (TARGET_LINK_LIBRARIES):
> Cannot specify link libraries for target
> "Quasi_Static_Finite_Strain_Beam_Buckling_Analysis" which is not built by
> this project.
>
>
> -- Configuring incomplete, errors occurred!
> See also
> "/home/animesh/Documents/dealii/dealii-9.2.0/examples/Quasi_Static_Finite_Strain_Beam_Buckling_Analysis/CMakeFiles/CMakeOutput.log".
At the place where you call TARGET_LINK_LIBRARIES, you have not declared any
targets at all. So the error message seems correct to me.
You may want to move this line below DEAL_II_INVOKE_AUTOPILOT which declares
the target for you. Here's an example from the code gallery that does
something similar:
https://github.com/dealii/code-gallery/blob/master/parallel_in_time/CMakeLists.txt